Exemple #1
0
        public void WhenAssignFKToWhiteSpacesThenAssignNone()
        {
            var hbm = new HbmKey();
            var km  = new KeyMapper(typeof(Animal), hbm);

            km.ForeignKey("    ");
            hbm.foreignkey.Should().Be("none");
        }
Exemple #2
0
        public void WhenAssignFKToValidNameThenAssignName()
        {
            var hbm = new HbmKey();
            var km  = new KeyMapper(typeof(Animal), hbm);

            km.ForeignKey("FKDeLaPizza");
            hbm.foreignkey.Should().Be("FKDeLaPizza");
        }
Exemple #3
0
        public void WhenAssignFKToNullThenSetToNull()
        {
            var hbm = new HbmKey();

            hbm.foreignkey = "aPreviousValue";
            var km = new KeyMapper(typeof(Animal), hbm);

            km.ForeignKey(null);
            hbm.foreignkey.Should().Be.Null();
        }