public void AfterSetMultiColumnsCantSetSimpleColumn()
        {
            var mapping = new HbmManyToMany();
            var mapper = new ManyToManyMapper(typeof(MyClass), mapping, null);
            mapper.Columns(cm => cm.Length(50), cm => cm.SqlType("VARCHAR(10)"));

            mapper.Executing(x => x.Column(cm => cm.Length(50))).Throws<ConfOrm.MappingException>();
        }
 public void WhenSetMultiColumnsValuesThenAutoassignColumnNames()
 {
     var mapping = new HbmManyToMany();
     var mapper = new ManyToManyMapper(typeof(MyClass), mapping, null);
     mapper.Columns(cm => cm.Length(50), cm => cm.SqlType("VARCHAR(10)"));
     mapping.Columns.Should().Have.Count.EqualTo(2);
     mapping.Columns.All(cm => cm.name.Satisfy(n => !string.IsNullOrEmpty(n)));
 }
 public void WhenSetMultiColumnsValuesThenAddColumns()
 {
     var mapping = new HbmManyToMany();
     var mapper = new ManyToManyMapper(typeof(MyClass), mapping, null);
     mapper.Columns(cm =>
     {
         cm.Name("column1");
         cm.Length(50);
     }, cm =>
     {
         cm.Name("column2");
         cm.SqlType("VARCHAR(10)");
     });
     mapping.Columns.Should().Have.Count.EqualTo(2);
 }