public void ShouldSerializeTest_No_Default() { PropertyDescriptor p = TypeDescriptor.GetProperties(typeof(ShouldSerialize_No_Default)) ["Prop"]; ShouldSerialize_No_Default test = new ShouldSerialize_No_Default(); Assert.IsTrue(p.ShouldSerializeValue(test), "#1"); test.Prop = "whatever"; Assert.IsTrue(p.ShouldSerializeValue(test), "#2"); }
public void ShouldSerializeTest_No_Default () { PropertyDescriptor p = TypeDescriptor.GetProperties (typeof (ShouldSerialize_No_Default)) ["Prop"]; ShouldSerialize_No_Default test = new ShouldSerialize_No_Default (); Assert.IsTrue (p.ShouldSerializeValue (test), "#1"); test.Prop = "whatever"; Assert.IsTrue (p.ShouldSerializeValue (test), "#2"); }