AnalyzeStructureIntegrationTests.cs 597 B

12345678910111213141516171819202122
  1. using Xunit;
  2. using analyzeJSON;
  3. namespace analyzeJSONTests
  4. {
  5. public class AnalyzeStructureIntegrationTests
  6. {
  7. private static readonly string testFile = @"testFiles/complex.json";
  8. [Fact]
  9. public void AnalyzeToken_withTraverse()
  10. {
  11. var test = new AnalyzeJSON(testFile);
  12. var analyze = new AnalyzeStructure();
  13. test.Traverse((token) => analyze.AnalyzeToken(token));
  14. var result = analyze.Result;
  15. Assert.Equal(9, result.Nodes.Count);
  16. Assert.Equal(9, result.Leafs.Count);
  17. }
  18. }
  19. }