public void Locator_Should_Discover_One_Definition_From_PropertyGroupAuthorizedTypedPageData() { PropertyGroupAuthorizedTypedPageData typedPageData = new PropertyGroupAuthorizedTypedPageData(); SetupTabBasedPropertiesAndPropertyGroupPageDataProperties(typedPageData); _locator = new AuthorizedPropertyDefinitionLocator(typedPageData, typedPageData.GetType(), new FakeTabDefinitionRepository()); var actualDefinitionList = _locator.GetAuthorizedPropertyDefinitions(); Assert.IsTrue(actualDefinitionList.Count == 1); var propertyOneDefinition = actualDefinitionList.Single(d => d.PropertyName == "PropertyGroup1-Property1"); Assert.IsTrue(propertyOneDefinition.AuthorizedPrincipals.Contains("Role1")); }
public void Locator_Should_Discover_One_Definition_From_PropertyGroupAuthorizedTypedPageData() { PropertyGroupAuthorizedTypedPageData typedPageData = new PropertyGroupAuthorizedTypedPageData(); SetupTabBasedPropertiesAndPropertyGroupPageDataProperties(typedPageData); _locator = new AuthorizedPropertyDefinitionLocator(typedPageData, typedPageData.GetType(), new FakeTabDefinitionRepository()); var actualDefinitionList = _locator.GetAuthorizedPropertyDefinitions(); Assert.IsTrue(actualDefinitionList.Count == 1); }