Beispiel #1
0
        public void CallPropertyMapper()
        {
            var mapdoc    = new HbmMapping();
            var component = new HbmCompositeElement();
            var mapper    = new ComponentElementMapper(typeof(Address), mapdoc, component);
            var called    = false;

            mapper.Property(typeof(Address).GetProperty("Street"), x => called = true);
            called.Should().Be.True();
        }
Beispiel #2
0
        public void CanMapProperty()
        {
            var mapdoc    = new HbmMapping();
            var component = new HbmCompositeElement();
            var mapper    = new ComponentElementMapper(typeof(Address), mapdoc, component);

            mapper.Property(typeof(Address).GetProperty("Street"), x => { });
            component.Properties.Should().Have.Count.EqualTo(1);
            component.Properties.First().Name.Should().Be.EqualTo("Street");
        }