コード例 #1
0
ファイル: TestStringImporter.cs プロジェクト: bubbafat/Hebo
 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);
 }
コード例 #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);
        }
コード例 #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);
        }