public void GetDirectChildrenTest() { var test = new RelatableTest(); test.PropertyObjects.Add(new TECMisc(CostType.TEC), "TestingDirect"); test.PropertyObjects.Add(new TECLocation(), "TestingRelated"); test.LinkedObjects.Add(new TECLocation(), "TestingRelated"); Assert.IsTrue(test.GetDirectChildren().Count == 1); }
public void GetAllTest() { var test = new RelatableTest(); test.PropertyObjects.Add(new TECMisc(CostType.TEC), "TestingDirect"); test.PropertyObjects.Add(new TECLocation(), "TestingRelated"); test.LinkedObjects.Add(new TECLocation(), "TestingRelated"); Assert.IsTrue(test.GetAll <TECAssociatedCost>().Count == 0); Assert.IsTrue(test.GetAll <TECLocation>().Count == 0); Assert.IsTrue(test.GetAll <TECMisc>().Count == 1); }
public void IsDirectChildPropertyTest() { var test = new RelatableTest(); var misc = new TECMisc(CostType.TEC); test.PropertyObjects.Add(misc, "TestingDirect"); var location = new TECLocation(); test.PropertyObjects.Add(location, "TestingRelated"); test.LinkedObjects.Add(location, "TestingRelated"); Assert.IsTrue(test.IsDirectChildProperty("TestingDirect")); Assert.IsFalse(test.IsDirectChildProperty("TestingRelated")); }