private static void AssertImport(object expected, string input) { JsonTextReader reader = new JsonTextReader(new StringReader(input)); GuidImporter importer = new GuidImporter(); object o = importer.Import(new ImportContext(), reader); Assert.IsTrue(reader.EOF, "Reader must be at EOF."); if (expected != null) Assert.IsInstanceOfType(typeof(Guid), o); Assert.AreEqual(expected, o); }
static void AssertImport(object expected, string input) { var reader = new JsonTextReader(new StringReader(input)); var importer = new GuidImporter(); var o = importer.Import(new ImportContext(), reader); Assert.IsTrue(reader.EOF, "Reader must be at EOF."); if (expected != null) { Assert.IsInstanceOf <Guid>(o); } Assert.AreEqual(expected, o); }
private static void AssertImport(object expected, string input) { JsonTextReader reader = new JsonTextReader(new StringReader(input)); GuidImporter importer = new GuidImporter(); object o = importer.Import(new ImportContext(), reader); Assert.IsTrue(reader.EOF, "Reader must be at EOF."); if (expected != null) { Assert.IsInstanceOfType(typeof(Guid), o); } Assert.AreEqual(expected, o); }