(t *testing.T)
| 237 | } |
| 238 | |
| 239 | func TestServer_HandleRequest_InvalidMethod(t *testing.T) { |
| 240 | system := actor.NewSystem("test-a2a") |
| 241 | defer system.Shutdown() |
| 242 | |
| 243 | taskStore := NewInMemoryTaskStore() |
| 244 | server := NewServer(system, taskStore) |
| 245 | |
| 246 | req := &JSONRPCRequest{ |
| 247 | JSONRPC: "2.0", |
| 248 | ID: "req-1", |
| 249 | Method: "invalid/method", |
| 250 | Params: []byte("{}"), |
| 251 | } |
| 252 | |
| 253 | ctx := context.Background() |
| 254 | resp := server.HandleRequest(ctx, "agent-1", req) |
| 255 | |
| 256 | require.NotNil(t, resp) |
| 257 | assert.NotNil(t, resp.Error) |
| 258 | assert.Equal(t, ErrorCodeMethodNotFound, resp.Error.Code) |
| 259 | } |
| 260 | |
| 261 | func TestServer_HandleRequest_InvalidParams(t *testing.T) { |
| 262 | system := actor.NewSystem("test-a2a") |
nothing calls this directly
no test coverage detected