Beispiel #1
0
 public void TestMethodRed1()
 {
     var json = JsonParser.ParseJson("[1,\"red\",5]");
     JsonAnalyzer analyzer = new JsonAnalyzer();
     var intStream = analyzer.CreateIntegerStreamWithoutRedMaps(json);
     int result = intStream.Sum();
     Assert.AreEqual(6, result);
 }
Beispiel #2
0
 public void TestMethodRed2()
 {
     var json = JsonParser.ParseJson("{\"d\":\"red\", \"e\":[1,2,3,4],\"f\":5}");
     JsonAnalyzer analyzer = new JsonAnalyzer();
     var intStream = analyzer.CreateIntegerStreamWithoutRedMaps(json);
     int result = intStream.Sum();
     Assert.AreEqual(0, result);
 }
Beispiel #3
0
 public void TestMethodRed()
 {
     var json = JsonParser.ParseJson(CreateResource());
     JsonAnalyzer analyzer = new JsonAnalyzer();
     var intStream = analyzer.CreateIntegerStreamWithoutRedMaps(json);
     int result = intStream.Sum();
     Assert.AreEqual(65402, result);
 }