public void MapperTest_Field_FieldCount() { var fake = new MapperFieldsFake(); var mapper = new Mapper(fake); Assert.True(mapper.Fields.Count == 2); }
public void MapperTest_Field_FieldValue() { var fake = new MapperFieldsFake(); var mapper = new Mapper(fake); Assert.Equal(3, mapper.Fields[0].Member.GetValue(fake)); Assert.Equal("test", mapper.Fields[1].Member.GetValue(fake)); }
public void MapperTest_Field_FieldInfo() { var fake = new MapperFieldsFake(); var mapper = new Mapper(fake); Assert.True(mapper.Fields[0].Member.IsPublic); Assert.False(mapper.Fields[1].Member.IsPublic); Assert.True(mapper.Fields[1].Member.IsStatic); Assert.Equal("_intField", mapper.Fields[0].Member.Name); Assert.Equal("_stringField", mapper.Fields[1].Member.Name); }