| 1 | namespace GitMcp.Tests; |
| 2 | |
| 3 | public sealed class McpToolsDocTests |
| 4 | { |
| 5 | [Fact] |
| 6 | public void Mcp_tools_md_matches_ToolCatalog_headings() |
| 7 | { |
| 8 | var path = Path.Combine(AppContext.BaseDirectory, "docs", "MCP-TOOLS.md"); |
| 9 | Assert.True(File.Exists(path), $"Missing copied doc: {path}"); |
| 10 | |
| 11 | var text = File.ReadAllText(path); |
| 12 | Assert.Contains("<!-- GENERATED:ToolCatalog START -->", text); |
| 13 | Assert.Contains("<!-- GENERATED:ToolCatalog END -->", text); |
| 14 | |
| 15 | foreach (var tool in ToolCatalog.Build()) |
| 16 | { |
| 17 | Assert.Contains($"### `{tool.Name}`", text); |
| 18 | Assert.False(string.IsNullOrEmpty(tool.Description)); |
| 19 | Assert.Contains(tool.Description!, text); |
| 20 | } |
| 21 | } |
| 22 | } |
| 23 | |
View only · write via MCP/CIDE