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(ForClass<Animal>.Property(x=> x.Name));
            hbm.propertyref.Should().Be("Name");
        }
 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)));
 }