(t *testing.T)
| 68 | } |
| 69 | |
| 70 | func TestA2AServer_Invoke(t *testing.T) { |
| 71 | t.Parallel() |
| 72 | |
| 73 | _, runConfig := startRecordingAIProxy(t) |
| 74 | agentCard := startA2AServer(t, "testdata/basic.yaml", runConfig) |
| 75 | |
| 76 | resp := sendA2AMessage(t, agentCard.URL, "test-request-1", "msg-1", "What is 2+2? Answer with just the number.") |
| 77 | |
| 78 | assert.Equal(t, "2.0", resp.Jsonrpc) |
| 79 | assert.Equal(t, "test-request-1", resp.ID) |
| 80 | assert.Nil(t, resp.Error) |
| 81 | require.NotNil(t, resp.Result) |
| 82 | |
| 83 | texts := resp.textParts() |
| 84 | require.NotEmpty(t, texts) |
| 85 | for _, text := range texts { |
| 86 | assert.Equal(t, "4", text) |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | func TestA2AServer_MultipleRequests(t *testing.T) { |
| 91 | t.Parallel() |
nothing calls this directly
no test coverage detected