public void BooleanCallsImportBoolean() { JsonReader reader = CreateReader("true"); ImporterMock importer = new ImporterMock(); importer.Boolean = true; Assert.AreEqual(true, importer.Import(new ImportContext(), reader)); }
public void ArrayCallsImportArray() { JsonReader reader = CreateReader("[]"); ImporterMock importer = new ImporterMock(); object result = new object(); importer.Array = result; Assert.AreEqual(result, importer.Import(new ImportContext(), reader)); }
public void BooleanCallsImportBoolean() { JsonReader reader = CreateReader("true"); ImporterMock importer = new ImporterMock(); importer.Boolean = true; Assert.AreEqual(true, importer.Import(new ImportContext(), reader)); }
public void NumberCallsImportNumber() { JsonReader reader = CreateReader("42"); ImporterMock importer = new ImporterMock(); const int result = 42; importer.Number = result; Assert.AreEqual(result, importer.Import(new ImportContext(), reader)); }
public void StringCallsImportString() { var reader = CreateReader("''"); var importer = new ImporterMock(); const string result = "hello"; importer.String = result; Assert.AreEqual(result, importer.Import(new ImportContext(), reader)); }
public void NumberCallsImportNumber() { var reader = CreateReader("42"); var importer = new ImporterMock(); const int result = 42; importer.Number = result; Assert.AreEqual(result, importer.Import(new ImportContext(), reader)); }
public void ObjectCallsImportObject() { var reader = CreateReader("{}"); var importer = new ImporterMock(); var result = new object(); importer.Object = result; Assert.AreEqual(result, importer.Import(new ImportContext(), reader)); }
public void ArrayCallsImportArray() { var reader = CreateReader("[]"); var importer = new ImporterMock(); var result = new object(); importer.Array = result; Assert.AreEqual(result, importer.Import(new ImportContext(), reader)); }
public void BooleanCallsImportBoolean() { var reader = CreateReader("true"); var importer = new ImporterMock { Boolean = true }; Assert.AreEqual(true, importer.Import(new ImportContext(), reader)); }
public void StringCallsImportString() { JsonReader reader = CreateReader("''"); ImporterMock importer = new ImporterMock(); const string result = "hello"; importer.String = result; Assert.AreEqual(result, importer.Import(new ImportContext(), reader)); }
public void ObjectCallsImportObject() { JsonReader reader = CreateReader("{}"); ImporterMock importer = new ImporterMock(); object result = new object(); importer.Object = result; Assert.AreEqual(result, importer.Import(new ImportContext(), reader)); }