StatisticsIntegrationTests.cs 661 B

1234567891011121314151617181920212223
  1. using Xunit;
  2. using analyzeJSON;
  3. namespace analyzeJSONTests
  4. {
  5. public class StatisticsIntegrationTests
  6. {
  7. private static readonly string testFile = @"testFiles/complex.json";
  8. [Fact]
  9. public void RunStatistics_withTraverse()
  10. {
  11. var test = new AnalyzeJSON(testFile);
  12. var stats = new Statistics();
  13. var status = test.Traverse((token) => stats.RunStatistics(token));
  14. Assert.True(status.Success);
  15. Assert.Empty(status.Message);
  16. Assert.Equal(11, stats.Result.NodeCounts.Count);
  17. Assert.Equal(168, stats.Result.TotalWordCount);
  18. }
  19. }
  20. }