public void NonAutoPropertiesAreNotDeSerialized() { var reflectionReader = new ReflectionTypeReader(typeof(HasPropertyWithBackingField)); reflectionReader.ReadType(this.mockedReader.Object); this.mockedReader.Verify(mr => mr.Read(typeof(int)), Times.Once()); }
public void IgnoredAutoPropertiesAreNotDeserialized() { var reflectionReader = new ReflectionTypeReader(typeof(HasIgnoredAutoProperty)); reflectionReader.ReadType(this.mockedReader.Object); this.mockedReader.Verify(mr => mr.Read(It.IsAny<Type>()), Times.Never()); }
public void IgnoresFieldThatUseIgnoreSerializeAttribute() { var reflectionReader = new ReflectionTypeReader(typeof(HasIgnoredField)); reflectionReader.ReadType(this.mockedReader.Object); this.mockedReader.Verify(mr => mr.Read(It.IsAny<Type>()), Times.Once()); }
public void AutoPropertiesAreDeserialized() { var reflectionReader = new ReflectionTypeReader(typeof(HasAutoProperty)); reflectionReader.ReadType(this.mockedReader.Object); this.mockedReader.Verify(mr => mr.Read(typeof(int)), Times.Once()); }