(t *testing.T)
| 1228 | } |
| 1229 | |
| 1230 | func TestServerToolHandlerPanicOnNil(t *testing.T) { |
| 1231 | tool := ServerTool{ |
| 1232 | Tool: mcp.Tool{Name: "no_handler"}, |
| 1233 | Toolset: testToolsetMetadata("toolset1"), |
| 1234 | } |
| 1235 | |
| 1236 | defer func() { |
| 1237 | if r := recover(); r == nil { |
| 1238 | t.Error("Expected Handler() to panic when HandlerFunc is nil") |
| 1239 | } |
| 1240 | }() |
| 1241 | |
| 1242 | tool.Handler(nil) |
| 1243 | } |
| 1244 | |
| 1245 | // Tests for Enabled function on ServerTool |
| 1246 | func TestServerToolEnabled(t *testing.T) { |
nothing calls this directly
no test coverage detected