public void DefaultValueHandlingPropertyTest()
        {
            DefaultValueHandlingPropertyClass c = new DefaultValueHandlingPropertyClass();

            string json = JsonConvert.SerializeObject(c, Formatting.Indented);

            StringAssert.AreEqual(@"{
  ""IntInclude"": 0,
  ""IntDefault"": 0
}", json);

            json = JsonConvert.SerializeObject(c, Formatting.Indented, new JsonSerializerSettings
            {
                DefaultValueHandling = DefaultValueHandling.Ignore
            });

            StringAssert.AreEqual(@"{
  ""IntInclude"": 0
}", json);

            json = JsonConvert.SerializeObject(c, Formatting.Indented, new JsonSerializerSettings
            {
                DefaultValueHandling = DefaultValueHandling.Include
            });

            StringAssert.AreEqual(@"{
  ""IntInclude"": 0,
  ""IntDefault"": 0
}", json);
        }
        public void DefaultValueHandlingPropertyTest()
        {
            DefaultValueHandlingPropertyClass c = new DefaultValueHandlingPropertyClass();

            string json = JsonConvert.SerializeObject(c, Formatting.Indented);

            StringAssert.AreEqual(@"{
  ""IntInclude"": 0,
  ""IntDefault"": 0
}", json);

            json = JsonConvert.SerializeObject(c, Formatting.Indented, new JsonSerializerSettings
            {
                DefaultValueHandling = DefaultValueHandling.Ignore
            });

            StringAssert.AreEqual(@"{
  ""IntInclude"": 0
}", json);

            json = JsonConvert.SerializeObject(c, Formatting.Indented, new JsonSerializerSettings
            {
                DefaultValueHandling = DefaultValueHandling.Include
            });

            StringAssert.AreEqual(@"{
  ""IntInclude"": 0,
  ""IntDefault"": 0
}", json);
        }