StatisticsIntegrationTests.cs 565 B

123456789101112131415161718192021
  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. test.Traverse((token) => stats.RunStatistics(token));
  14. Assert.Equal(10, stats.Result.NodeCounts.Count);
  15. Assert.Equal(165, stats.Result.TotalWordCount);
  16. }
  17. }
  18. }