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); }
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); }
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); }