public void MapType() { // Arrange var mapDefinition = new MapDefinition <SampleModel>(); // Act mapDefinition.MapType(); // Assert var fields = mapDefinition.FieldMapDefinitions; Assert.Equal(3, fields.Count); AssertFieldMap(fields, "Test1", "Test1", true); AssertFieldMap(fields, "Test2", "Test2", false); AssertFieldMap(fields, "Test3", "Test3", true); }
public void MapTypeThenOverride() { // Arrange var mapDefinition = new MapDefinition<SampleModel>(); // Act mapDefinition.MapType(); mapDefinition.Map(model => model.Test2, "Foo", true); mapDefinition.Map(model => model.Test3, false); // Assert var fields = mapDefinition.FieldMapDefinitions; Assert.Equal(3, fields.Count); AssertFieldMap(fields, "Test1", "Test1", true); AssertFieldMap(fields, "Test2", "Foo", true); AssertFieldMap(fields, "Test3", "Test3", false); }