public void WhenAssignReferenceOutSideTheOwnerEntityThenThrow() { var hbm = new HbmKey(); var km = new KeyMapper(typeof(Animal), hbm); Executing.This(() => km.PropertyRef(ConfOrm.ForClass <B> .Property(x => x.Name))).Should().Throw <ArgumentOutOfRangeException>(); }
public void WhenAssignReferenceOutSideTheOwnerEntityThenThrow() { var hbm = new HbmKey(); var km = new KeyMapper(typeof(Animal), hbm); ActionAssert.Throws <ArgumentOutOfRangeException>(() => km.PropertyRef(ForClass <B> .Property(x => x.Name))); }
public void WhenAssignReferenceToNullThenNullifyReference() { var hbm = new HbmKey(); var km = new KeyMapper(typeof(Animal), hbm); km.PropertyRef(null); hbm.propertyref.Should().Be.Null(); }
public void AssignPropertyReference() { var hbm = new HbmKey(); var km = new KeyMapper(typeof(Animal), hbm); km.PropertyRef(ConfOrm.ForClass <Animal> .Property(x => x.Name)); hbm.propertyref.Should().Be("Name"); }