public void WhenForceClassRelationToIncompatibleTypeThenThrows()
        {
            var hbm = new HbmOneToMany();
            var mapper = new OneToManyMapper(typeof(IMyInterface), hbm, null);

            Executing.This(() => mapper.Class(typeof(Whatever))).Should().Throw<ArgumentOutOfRangeException>();
        }
 public void CanAssignNotFoundMode()
 {
     var hbm = new HbmOneToMany();
     var mapper = new OneToManyMapper(typeof(MyClass), hbm, null);
     mapper.NotFound(NotFoundMode.Ignore);
     hbm.NotFoundMode.Should().Be(HbmNotFoundMode.Ignore);
 }
 public void CanAssignEntityName()
 {
     var hbm = new HbmOneToMany();
     var mapper = new OneToManyMapper(typeof(MyClass), hbm, null);
     mapper.EntityName("myname");
     hbm.EntityName.Should().Be("myname");
 }
        public void CanForceClassRelation()
        {
            var hbm = new HbmOneToMany();
            var mapper = new OneToManyMapper(typeof(IMyInterface), hbm, null);

            mapper.Class(typeof(MyClass));

            hbm.Class.Should().Contain("MyClass").And.Not.Contain("IMyInterface");
        }