示例#1
0
        public void UnmarkedFieldsAreNotSerialized()
        {
            var original = new SomeClassWithSerialzers {
                IntField = 2, IntProperty = 30, UnmarkedField = 12, UnmarkedProperty = 47
            };
            var result = this.RoundTripThroughCodec(original);

            Assert.NotEqual(original.UnmarkedField, result.UnmarkedField);
            Assert.NotEqual(original.UnmarkedProperty, result.UnmarkedProperty);
        }
示例#2
0
        public void GeneratedSerializersRoundTripThroughSerializer()
        {
            var original = new SomeClassWithSerialzers {
                IntField = 2, IntProperty = 30
            };
            var result = (SomeClassWithSerialzers)this.RoundTripThroughUntypedSerializer(original);

            Assert.Equal(original.IntField, result.IntField);
            Assert.Equal(original.IntProperty, result.IntProperty);
        }