public void Should_Find_Definition_From_Tab_For_PropertyGroupWithTabAuthorizationAuthorizedTypedPageData()
        {
            var typedPageData = new PropertyGroupWithTabAuthorizationAuthorizedTypedPageData();
            SetupTabBasedPropertiesAndPropertyGroupPageDataProperties(typedPageData);

            _locator = new AuthorizedPropertyDefinitionLocator(typedPageData, typedPageData.GetType(), new FakeTabDefinitionRepository());

            var actualDefinitionList = _locator.GetAuthorizedPropertyDefinitions();
            Assert.IsTrue(actualDefinitionList.First().AuthorizedPrincipals.Contains("Role5"));
        }
 public void Locator_Should_Discover_One_Definition_From_PropertyGroupWithTabAuthorizationAuthorizedTypedPageData()
 {
     PropertyGroupWithTabAuthorizationAuthorizedTypedPageData typedPageData = new PropertyGroupWithTabAuthorizationAuthorizedTypedPageData();
     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_PropertyGroupWithTabAuthorizationAuthorizedTypedPageData()
 {
     var typedPageData = new PropertyGroupWithTabAuthorizationAuthorizedTypedPageData();
     SetupTabBasedPropertiesAndPropertyGroupPageDataProperties(typedPageData);
     
     _locator = new AuthorizedPropertyDefinitionLocator(typedPageData, typedPageData.GetType(), new FakeTabDefinitionRepository());
     
     var actualDefinitionList = _locator.GetAuthorizedPropertyDefinitions();
     Assert.IsTrue(actualDefinitionList.Count == 1);
 }