public void test10_empty_json(String jsonValue) { Dictionary <String, Object> json = NewParser.Parse(jsonValue); //Assert.That (NewParser.findClosingDoubleQuotesPosition( "\\\"sdsd\""), Is.EqualTo(6) ); Assert.AreEqual(json.Count, 0); }
public void test40_duplicate_key_error(String jsonValue) { // Dictionary<String, Object> json = NewParser.parse( jsonValue ); Assert.Throws <DuplicateKeyException>(delegate { NewParser.Parse(jsonValue); }); }
public void test21_unclosed_object_error(String jsonValue) { // Dictionary<String, Object> json = NewParser.parse( jsonValue ); Assert.Throws <FormatException>(delegate { NewParser.Parse(jsonValue); }); }
public void ParseByOne_FromTestCase_ReturnCountsFromTestCase(string number, int expected) { var parser = new NewParser(); var result = parser.ParseByOne(number); Assert.AreEqual(expected, result.Count); }
public void ParseLine_Tester(List <string> lines) { //var lines = IOHelper.GetLinesFromPages(new List<string>(new string[] { "14 Nov Direct Debit 044952 OPTUS", "10478488000192 97.20 $ $1,912.00 DR" }), true); // Direct Debit 044952 OPTUS10478488000192 97.20 $ $1,912.00 DR var parser = new NewParser(); //var result = parser.GetPrototypesFromLines(new Queue<string>(lines)); var result = parser.GetPrototypesFromLines(lines, 2016, AccountType.StreamLine, "xxx"); Assert.That(result.Count, Is.GreaterThan(0)); }
public void test80_boolean_value(String jsonValue) { Dictionary <String, Object> json = NewParser.Parse(jsonValue); Assert.AreEqual(json.Count, 4); }
public void test71_empty_object_value(String jsonValue) { Dictionary <String, Object> json = NewParser.Parse(jsonValue); Assert.AreEqual(json.Count, 4); }
public void test60_null_value(String jsonValue) { Dictionary <String, Object> json = NewParser.Parse(jsonValue); Assert.AreEqual(json.Count, 3); }
public void test51_double_string_values(String jsonValue) { Dictionary <String, Object> json = NewParser.Parse(jsonValue); Assert.AreEqual(json.Count, 3); }
public void test30_several_key_value(String jsonValue) { Dictionary <String, Object> json = NewParser.Parse(jsonValue); Assert.AreEqual(json.Count, 3); }
public void test20_one_key_value(String jsonValue) { Dictionary <String, Object> json = NewParser.Parse(jsonValue); Assert.AreEqual(json.Count, 1); }
public void test104_parse_object_complex(string jsonValue) { Dictionary <String, Object> json = NewParser.Parse(jsonValue); Assert.AreEqual(json.Count, 7); }
public void test103_parse_object_with_array(string jsonValue) { Dictionary <String, Object> json = NewParser.Parse(jsonValue); Assert.AreEqual(json.Count, 5); }
public void test100_parse_string_escape(string jsonValue) { Dictionary <String, Object> json = NewParser.Parse(jsonValue); Assert.AreEqual(json.Count, 1); }
public void test91_array_value(String jsonValue) { Dictionary <String, Object> json = NewParser.Parse(jsonValue); Assert.AreEqual(json.Count, 6); }
private static void DoParseHeaders(AnalyzeHeader analyze, string dir, bool emitting) { var parser = new NewParser(); string[] files = Directory.GetFiles(dir, "*.h"); foreach (string inFile in files) { if (!inFile.EndsWith("NSObjCRuntime.h")) { string text = File.ReadAllText(inFile); XmlNode node = parser.Parse(text, inFile); analyze.Header(node.ChildNodes[0], inFile, emitting); } } }