public void SerializeDerivedContainmentNavigationWithBaseAssociationSet()
        {
            var model = NavigationTestModelBuilder.DerivedContainmentNavigationWithBaseAssociationSet();
            var csdls = NavigationTestModelBuilder.DerivedContainmentNavigationWithBaseAssociationSetCsdl();

            this.SerializingValidator(model, csdls);
        }
        public void ParsingDerivedContainmentNavigationWithBaseAssociationSetCsdl()
        {
            var csdls = NavigationTestModelBuilder.DerivedContainmentNavigationWithBaseAssociationSetCsdl();
            var model = this.GetParserResult(csdls);

            this.CheckEntityTypeNavigationCount(model, "NS.Person", 1);
            this.CheckEntityTypeNavigationCount(model, "NS.Employee", 2);
            this.CheckEntityTypeNavigationCount(model, "NS.Home", 1);
            this.CheckEntityTypeNavigationCount(model, "NS.Office", 2);

            var personToHome = model.FindEntityType("NS.Person").NavigationProperties().First();

            this.CheckNavigationContainment(personToHome, true, false);
            var homeToPerson = model.FindEntityType("NS.Home").NavigationProperties().First();

            this.CheckNavigationContainment(homeToPerson, false, true);
            this.CheckNavigationsArePartners(personToHome, homeToPerson);

            var employeeToOffice = model.FindEntityType("NS.Employee").NavigationProperties().Where(n => n.Name.Equals("ToOffice")).First();

            this.CheckNavigationContainment(employeeToOffice, true, false);
            var officeToEmployee = model.FindEntityType("NS.Office").NavigationProperties().Where(n => n.Name.Equals("ToEmployee")).First();

            this.CheckNavigationContainment(officeToEmployee, false, true);
            this.CheckNavigationsArePartners(employeeToOffice, officeToEmployee);

            var container = model.EntityContainer;
            var personSet = container.FindEntitySet("PersonSet");
            var homeSet   = container.FindEntitySet("HomeSet");

            Assert.AreEqual(homeSet.FindNavigationTarget(employeeToOffice.Partner), personSet, "Invalid entity set navigation target.");

            // Contained entity set is generated dynamically.
            // Assert.AreEqual(personSet.FindNavigationTarget(officeToEmployee.Partner), homeSet, "Invalid entity set navigation target.");
        }