TestAllToolsHaveHandlerFunc ensures all tools have a handler function
(t *testing.T)
| 160 | |
| 161 | // TestAllToolsHaveHandlerFunc ensures all tools have a handler function |
| 162 | func TestAllToolsHaveHandlerFunc(t *testing.T) { |
| 163 | tools := AllTools(stubTranslation) |
| 164 | |
| 165 | for _, tool := range tools { |
| 166 | t.Run(tool.Tool.Name, func(t *testing.T) { |
| 167 | assert.NotNil(t, tool.HandlerFunc, |
| 168 | "Tool %q must have a HandlerFunc", tool.Tool.Name) |
| 169 | assert.True(t, tool.HasHandler(), |
| 170 | "Tool %q HasHandler() should return true", tool.Tool.Name) |
| 171 | }) |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | // TestToolsetMetadataConsistency ensures tools in the same toolset have consistent descriptions |
| 176 | func TestToolsetMetadataConsistency(t *testing.T) { |
nothing calls this directly
no test coverage detected