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