예제 #1
0
        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();
        }
예제 #5
0
        public void ManyToOneDbTypeSetCorrectly()
        {
            var config = new CustomConfigurationWithIndividualAdds(new DefaultMapper(new DefaultConvention()));

            Assert.Equal(DbType.Int32, config.GetMap <Post>().Columns["Author"].DbType);
        }
예제 #6
0
        public void NonEmptyConfigurationReturnsNonEmptyMaps()
        {
            var target = new CustomConfigurationWithIndividualAdds(SetupAllMaps().Object);

            Assert.NotEmpty(target.Maps);
        }