MCPcopy Create free account
hub / github.com/astercloud/aster / TestJSONRPCSuccess

Function TestJSONRPCSuccess

pkg/a2a/server_test.go:296–305  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

294}
295
296func TestJSONRPCSuccess(t *testing.T) {
297 // 测试成功响应的创建
298 result := map[string]string{"status": "ok"}
299 resp := NewSuccessResponse("req-1", result)
300
301 assert.Equal(t, "2.0", resp.JSONRPC)
302 assert.Equal(t, "req-1", resp.ID)
303 assert.Nil(t, resp.Error)
304 assert.NotNil(t, resp.Result)
305}

Callers

nothing calls this directly

Calls 1

NewSuccessResponseFunction · 0.85

Tested by

no test coverage detected