Пример #1
0
        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);
        }
Пример #2
0
 public PublicGettersSerializeTests()
 {
     _contractPublicGetters = new DataContractPublicGetters();
 }