Esempio n. 1
0
        public void OneToOneExecuteRelationMapping()
        {
            var  properties = new List <object>();
            var  map        = new StubPropertyContainerMapper <User>(properties);
            bool executed   = false;

            map.OneToOne(user => user.Human, rm => { executed = true; });
            executed.Should().Be.True();
        }
Esempio n. 2
0
        public void CanAddOneToOneProperty()
        {
            var properties = new List <object>();
            var map        = new StubPropertyContainerMapper <User>(properties);

            map.OneToOne(user => user.Human, rm => { });

            properties.Should().Have.Count.EqualTo(1);
            object first = properties.First();

            first.Should().Be.OfType <HbmOneToOne>().And.ValueOf.Name.Should().Be.EqualTo("Human");
        }