AnalyzeStructureIntegrationTests.cs 694 B

123456789101112131415161718192021222324
  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. var status = test.Traverse((token) => analyze.AnalyzeToken(token));
  14. Assert.True(status.Success);
  15. Assert.Empty(status.Message);
  16. var result = analyze.Result;
  17. Assert.Equal(9, result.Nodes.Count);
  18. Assert.Equal(10, result.Leafs.Count);
  19. }
  20. }
  21. }