Ejemplo n.º 1
0
        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)));
        }
Ejemplo n.º 3
0
        public void WhenAssignReferenceToNullThenNullifyReference()
        {
            var hbm = new HbmKey();
            var km  = new KeyMapper(typeof(Animal), hbm);

            km.PropertyRef(null);
            hbm.propertyref.Should().Be.Null();
        }
Ejemplo n.º 4
0
        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");
        }