csharpdeeb25a2 | 1 | using CasaField.Core; |
| 2 | using Xunit; |
| 3 | |
| 4 | namespace CascadeIDE.Tests; |
| 5 | |
| 6 | public sealed class CasaFieldCoreTests |
| 7 | { |
| 8 | [Fact] |
| 9 | public void GridDecoder_VotesConceptTokens() |
| 10 | { |
| 11 | var cells = new List<IReadOnlyList<string>> |
| 12 | { |
| 13 | new[] { "C:casa.lab.import_knowledge_delta", "C:casa.lab.import_knowledge_delta" }, |
| 14 | new[] { "C:casa.lab.import_knowledge_delta" }, |
| 15 | new List<string>(), |
| 16 | }; |
| 17 | |
| 18 | var decoded = GridDecoder.Decode(cells, minVotes: 2); |
| 19 | Assert.Contains("casa.lab.import_knowledge_delta", decoded.ConceptIds); |
| 20 | } |
| 21 | |
| 22 | [Fact] |
| 23 | public void HotPath_LoadsResearchAgentStore() |
| 24 | { |
| 25 | var store = Path.GetFullPath(Path.Combine( |
| 26 | AppContext.BaseDirectory, |
| 27 | "..", "..", "..", "..", |
| 28 | "..", "casa-ontology-payload", "examples", "agent-stores", "research-agent-lab-v0")); |
| 29 | |
| 30 | if (!File.Exists(Path.Combine(store, "field_state.json"))) |
| 31 | return; |
| 32 | |
| 33 | var result = CasaFieldHotPath.Run(store, "import knowledge delta"); |
| 34 | Assert.True(result.WallMs >= 0); |
| 35 | Assert.NotEmpty(result.ClaimsNav); |
| 36 | } |
| 37 | } |
| 38 | |
View only · write via MCP/CIDE