public void should_serialize_null()
        {
            var instance = new ClassWithTypedStringValueLowerCase();
            var json     = instance.ToJson();

            Assert.AreEqual("{ \"Value\" : null }", json);
        }
Exemple #2
0
        public void should_serialize_null()
        {
            var instance = new ClassWithTypedStringValueLowerCase();
            var json     = JsonConvert.SerializeObject(instance, _settings);

            Assert.AreEqual("{\"Value\":null}", json);
        }
        public void should_serialize_lowercase()
        {
            var instance = new ClassWithTypedStringValueLowerCase {
                Value = new TypedStringValueLowerCase("abc_123")
            };
            var json = instance.ToJson();

            Assert.AreEqual("{ \"Value\" : \"abc_123\" }", json);
        }
Exemple #4
0
        public void should_serialize_lowercase()
        {
            var instance = new ClassWithTypedStringValueLowerCase {
                Value = new TypedStringValueLowerCase("abc_123")
            };
            var json = JsonConvert.SerializeObject(instance, _settings);

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