public void GeneratedSerializersRoundTripThroughSerializer() { var original = new SomeClassWithSerializers { IntField = 2, IntProperty = 30 }; var result = (SomeClassWithSerializers)RoundTripThroughUntypedSerializer(original, out _); Assert.Equal(original.IntField, result.IntField); Assert.Equal(original.IntProperty, result.IntProperty); }
public void UnmarkedFieldsAreNotSerialized() { var original = new SomeClassWithSerializers { IntField = 2, IntProperty = 30, UnmarkedField = 12, UnmarkedProperty = 47 }; var result = RoundTripThroughCodec(original); Assert.NotEqual(original.UnmarkedField, result.UnmarkedField); Assert.NotEqual(original.UnmarkedProperty, result.UnmarkedProperty); }
public void GeneratedSerializersRoundTripThroughCodec() { var original = new SomeClassWithSerializers { IntField = 2, IntProperty = 30 }; var result = RoundTripThroughCodec(original); Assert.Equal(original.IntField, result.IntField); Assert.Equal(original.IntProperty, result.IntProperty); }