public void DeserializesEmptyObjectCorrectly()
        {
            var json = "{}";
            var obj = new DataContractPublicGetters();

            var result = (DataContractPublicGetters)SimpleJson.DeserializeObject(json, typeof(DataContractPublicGetters), SimpleJson.PocoJsonSerializerStrategy);

            Assert.IsNotNull(result);
            Assert.AreEqual(obj.DataMemberWithoutName, result.DataMemberWithoutName);
            Assert.AreEqual(obj.DatMemberWithName, result.DatMemberWithName);
            Assert.AreEqual(obj.IgnoreDataMember, result.IgnoreDataMember);
            Assert.AreEqual(obj.NoDataMember, result.NoDataMember);
        }
 public PublicGettersSerializeTests()
 {
     _contractPublicGetters = new DataContractPublicGetters();
 }
Ejemplo n.º 3
0
 public PublicGettersSerializeTests()
 {
     _contractPublicGetters = new DataContractPublicGetters();
 }