public void CopyToTest2() { var shape = new EntityGraphShape().Edge <G, GH>(x => x.GHSet); var g = new G(); g.GHSet.Add(new GH()); var result = shape.CopyTo <Entity, object>(g, new AssemblyTypeMapper <Test.E>()); Assert.IsTrue(result != null); Assert.IsTrue(result is Test.G); Assert.IsTrue(((Test.G)result).GHSet.Count() == g.GHSet.Count()); }
public void CopyToTest1() { var shape = new EntityGraphShape().Edge <G, GH>(x => x.GHSet); var g = new Test.G { GHSet = new List <Test.GH> { new Test.GH() } }; var result = shape.CopyTo <object, Entity>(g, new AssemblyTypeMapper <H>()); Assert.IsTrue(result != null); Assert.IsTrue(result is G); Assert.IsTrue(((G)result).GHSet.Count() == g.GHSet.Count()); }