Exemplo n.º 1
0
 private static void AssertImport(string expected, string input)
 {
     JsonTextReader reader = new JsonTextReader(new StringReader(input));
     StringImporter importer = new StringImporter();
     object o = importer.Import(new ImportContext(), reader);
     Assert.IsTrue(reader.EOF, "Reader must be at EOF.");
     if (expected != null)
         Assert.IsInstanceOfType(typeof(string), o);
     Assert.AreEqual(expected, o);
 }
Exemplo n.º 2
0
        private static void AssertImport(string expected, string input)
        {
            JsonTextReader reader   = new JsonTextReader(new StringReader(input));
            StringImporter importer = new StringImporter();
            object         o        = importer.Import(new ImportContext(), reader);

            Assert.IsTrue(reader.EOF, "Reader must be at EOF.");
            if (expected != null)
            {
                Assert.IsInstanceOfType(typeof(string), o);
            }
            Assert.AreEqual(expected, o);
        }
Exemplo n.º 3
0
        static void AssertImport(string expected, string input)
        {
            var reader   = new JsonTextReader(new StringReader(input));
            var importer = new StringImporter();
            var o        = importer.Import(new ImportContext(), reader);

            Assert.IsTrue(reader.EOF, "Reader must be at EOF.");
            if (expected != null)
            {
                Assert.IsInstanceOf <string>(o);
            }
            Assert.AreEqual(expected, o);
        }