public void AddEntitiesByGenericAreMapped() { var target = new CustomConfigurationWithIndividualAdds(SetupAllMaps().Object); Assert.NotNull(target); Assert.Equal(2, target.Maps.Count()); Assert.Equal(1, target.Maps.Count(m => m.Type == typeof(Post))); Assert.Equal(1, target.Maps.Count(m => m.Type == typeof(User))); new Mock <IMapper>(MockBehavior.Strict).Verify(); }
public void ManyToOneDbTypeSetCorrectly() { var config = new CustomConfigurationWithIndividualAdds(new DefaultMapper(new DefaultConvention())); Assert.Equal(DbType.Int32, config.GetMap<Post>().Columns["Author"].DbType); }
public void NonEmptyConfigurationReturnsNonEmptyMaps() { var target = new CustomConfigurationWithIndividualAdds(SetupAllMaps().Object); Assert.NotEmpty(target.Maps); }
public void AddEntitiesByGenericAreMapped() { var target = new CustomConfigurationWithIndividualAdds(SetupAllMaps().Object); Assert.NotNull(target); Assert.Equal(2, target.Maps.Count()); Assert.Equal(1, target.Maps.Count(m => m.Type == typeof(Post))); Assert.Equal(1, target.Maps.Count(m => m.Type == typeof(User))); new Mock<IMapper>(MockBehavior.Strict).Verify(); }
public void ManyToOneDbTypeSetCorrectly() { var config = new CustomConfigurationWithIndividualAdds(new DefaultMapper(new DefaultConvention())); Assert.Equal(DbType.Int32, config.GetMap <Post>().Columns["Author"].DbType); }