public void CallNestedComponentMapping() { var mapdoc = new HbmMapping(); var component = new HbmCompositeElement(); var mapper = new ComponentElementMapper(typeof(Address), mapdoc, component); var called = false; mapper.Component(typeof(Address).GetProperty("Number"), x => called = true ); called.Should().Be.True(); }
public void CanMapNestedComponent() { var mapdoc = new HbmMapping(); var component = new HbmCompositeElement(); var mapper = new ComponentElementMapper(typeof(Address), mapdoc, component); mapper.Component(typeof(Address).GetProperty("Number"), x => { }); component.Properties.Should().Have.Count.EqualTo(1); component.Properties.First().Name.Should().Be.EqualTo("Number"); component.Properties.First().Should().Be.OfType<HbmNestedCompositeElement>(); }