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 TestMethod7() { JsonAnalyzer json = new JsonAnalyzer(); int result = json.SumIntegers(CreateResource()); Assert.AreEqual(111754, result); }
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 TestMethod8() { JsonAnalyzer json = new JsonAnalyzer(); int result = json.SumIntegers(CreateStream("{\"e\": 86,\"c\": 23,\"a\": {\"a\": [ 120, 169, \"green\", \"red\", \"orange\" ],\"b\": \"red\"},\"g\": \"yellow\",\"b\": [ \"yellow\" ],\"d\": \"red\",\"f\": -19}")); Assert.AreEqual(379, result); }
public void TestMethod6() { JsonAnalyzer json = new JsonAnalyzer(); int result = json.SumIntegers(CreateStream("[-1,{\"a\":1}]")); Assert.AreEqual(0, result); }
public void TestMethod4() { JsonAnalyzer json = new JsonAnalyzer(); int result = json.SumIntegers(CreateStream("{\"a\":{\"b\":4},\"c\":-1}")); Assert.AreEqual(3, result); }
public void TestMethod3() { JsonAnalyzer json = new JsonAnalyzer(); int result = json.SumIntegers(CreateStream("[[[3]]]")); Assert.AreEqual(3, 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); }