public void TestChildrenWithAutoMappingFields() { // child records that include a one-to-one mapping var result = Connection().QuerySql( Beer.GetSelectNestedChildren(1, 2), null, Query.Returns(Some <InfiniteBeerListWithFields> .Records) .ThenChildren(Some <InfiniteBeerListWithFields> .Records)); }
public void TestChildrenWithAutoMapping() { // child records that include a one-to-one mapping var result = Connection().QuerySql( Beer.GetSelectNestedChildren(1, 2), null, Query.Returns(Some <InfiniteBeerList> .Records) .ThenChildren(OneToOne <InfiniteBeerList, InfiniteBeer> .Records)); Assert.AreEqual(3, result.Count()); Assert.AreEqual(1, result[0].List.Count()); Assert.IsNotNull(result[0].List[0].More); result[0].List[0].More.Verify(); }