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

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

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