Esempio n. 1
0
        public void should_serialize_null()
        {
            var instance = new ClassWithSampleIdentity();
            var json     = instance.ToJson();

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

            Assert.AreEqual("{ \"Value\" : \"Sample_1\" }", json);
        }