public void should_serialize_null() { var instance = new ClassWithSampleIdentity(); var json = instance.ToJson(); Assert.AreEqual("{ \"Value\" : null }", json); }
public void should_serialize() { var instance = new ClassWithSampleIdentity { Value = new SampleId("Sample_1") }; var json = instance.ToJson(); Assert.AreEqual("{ \"Value\" : \"Sample_1\" }", json); }