コード例 #1
0
        public void DeserializesEmptyObjectCorrectly()
        {
            var json = "{}";
            var obj = new DataContractPublicFields();

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

            Assert.IsNotNull(result);

            Assert.AreEqual(obj.NoDataMember, result.NoDataMember);
            Assert.AreEqual(obj.IgnoreDataMember, result.IgnoreDataMember);
            Assert.AreEqual(obj.DatMemberWithName, result.DatMemberWithName);
            Assert.AreEqual(obj.DataMemberWithoutName, result.DataMemberWithoutName);
        }
コード例 #2
0
 public PublicFieldsSerializeTests()
 {
     _dataContractPublicFields = new DataContractPublicFields();
 }
コード例 #3
0
 public PublicFieldsSerializeTests()
 {
     _dataContractPublicFields = new DataContractPublicFields();
 }