public void CityIsParentOfRestaurant() { var dynamicModuleManager = DynamicModuleManager.GetManager(); var restaurantType = TypeResolutionService.ResolveType(HierarchicalDynamicContentTests.RestaurantType); var restaurant = dynamicModuleManager.CreateDataItem(restaurantType); var isValidParent = DynamicContentExtensions.IsValidParent(restaurant, HierarchicalDynamicContentTests.CityType); Assert.IsTrue(isValidParent); }
public void CountryIsParentOfFestival() { var dynamicModuleManager = DynamicModuleManager.GetManager(); var festivalType = TypeResolutionService.ResolveType(HierarchicalDynamicContentTests.FestivalType); var festival = dynamicModuleManager.CreateDataItem(festivalType); var isValidParent = DynamicContentExtensions.IsValidParent(festival, HierarchicalDynamicContentTests.CountryType); Assert.IsTrue(isValidParent); }