示例#1
0
        public void should_serialize_null_lowercase()
        {
            var instance = new ClassWithTypedStringValue();
            var json     = JsonConvert.SerializeObject(instance, _settings);

            Assert.AreEqual("{\"Value\":null}", json);
        }
        public void should_serialize()
        {
            var instance = new ClassWithTypedStringValue {
                Value = new TypedStringValue("aBC_123")
            };
            var json = instance.ToJson();

            Assert.AreEqual("{ \"Value\" : \"aBC_123\" }", json);
        }
示例#3
0
        public void should_serialize()
        {
            var instance = new ClassWithTypedStringValue {
                Value = new TypedStringValue("aBc_123")
            };
            var json = JsonConvert.SerializeObject(instance, _settings);

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