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 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"); }