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

Function TestToolBridge_CallToolJSON_InvalidJSON

pkg/tools/bridge/bridge_test.go:107–120  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

105}
106
107func TestToolBridge_CallToolJSON_InvalidJSON(t *testing.T) {
108 registry := tools.NewRegistry()
109 bridge := NewToolBridge(registry)
110 ctx := context.Background()
111
112 result, err := bridge.CallToolJSON(ctx, "AnyTool", "not valid json", nil)
113 if err != nil {
114 t.Fatalf("CallToolJSON returned error: %v", err)
115 }
116
117 if result.Success {
118 t.Error("expected failure for invalid JSON")
119 }
120}
121
122func TestToolBridge_BatchCall(t *testing.T) {
123 registry := tools.NewRegistry()

Callers

nothing calls this directly

Calls 4

CallToolJSONMethod · 0.95
NewRegistryFunction · 0.92
NewToolBridgeFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected