public void ShouldDeserializeObjectWithoutTypeInfo() { const string json = "{\"$type\":\"" + TestTargetTypeName + "\",\"Id\":\"HalliGalli\"}"; var expected = new SerializationTestTarget { Id = "HalliGalli" }; JsonAssert.DeserializesTo(json, expected); }
public void ShouldNotDeserializeNullProperties() { JsonAssert.DeserializesTo( "{\"$type\":\"" + TestTargetTypeName + "\",\"Id\":null}", new SerializationTestTarget()); }
public void ShouldIgnoreMissingPropertiesForDeserialization() { JsonAssert.DeserializesTo("{\"$type\":\"" + TestTargetTypeName + "\"}", new SerializationTestTarget()); }
public void ShouldDeserializeNull() { JsonAssert.DeserializesTo("null", (object)null); }