public void TestGettingNullLists()
        {
            var o1 = MetadataReflector.BuildObjectDefHeader(typeof(A));
            var o2 = MetadataReflector.BuildObjectDefHeader(typeof(HasLists));
            var ob = MetadataReflector.BuildObjectDefHeader(typeof(B));

            var enricher = new ObjDefs(new[] { o1, o2, ob });

            var hl = new HasLists {
                As = null
            };

            var dataEntity = ObjDefConverter.To(
                hl, enricher);

            var a = ObjDefConverter.From <HasLists>(dataEntity, enricher);

            Assert.AreEqual(0, dataEntity.Properties.Count);
            Assert.AreEqual("HasLists", dataEntity.ObjectDefinitionFullName);
            Assert.IsTrue(a.As.Count == 0);
        }
        public void TestComplexLists()
        {
            var o1 = MetadataReflector.BuildObjectDefHeader(typeof(A));
            var o2 = MetadataReflector.BuildObjectDefHeader(typeof(HasLists));
            var ob = MetadataReflector.BuildObjectDefHeader(typeof(B));

            var enricher = new ObjDefs(new[] { o1, o2, ob });

            var hl = new HasLists {
                As = new List <A> {
                    Helper.MakeA()
                }
            };

            var dataEntity = ObjDefConverter.To(hl, enricher);

            var a = ObjDefConverter.From <HasLists>(dataEntity, enricher);

            Assert.AreEqual(0, dataEntity.Properties.Count);
            Assert.AreEqual("HasLists", dataEntity.ObjectDefinitionFullName);
            Assert.AreEqual("XYZ", a.As.First().S);
            Assert.AreEqual("ABC", a.As.First().B.A.S);
        }