public void AdminModuleInitializerGetsRegisteredOnSiteMap() { TestableModule module = new TestableModule(); SiteMapBuilderService service = new SiteMapBuilderService(); module.TestRegisterSiteMapInformation(service); SiteMapNodeInfo node = service.GetChildren(service.RootNode.Key)[0]; Assert.AreEqual("Admin", node.Key); }
public void AdminModuleInitializerRegistersTheAllowViewRolePermissionActionSet() { TestableModule module = new TestableModule(); MockPermissionsCatalog catalog = new MockPermissionsCatalog(); module.TestRegisterRequiredPermissions(catalog); Assert.IsNotNull(catalog.RegisteredPermissions["Admin"]); Assert.AreEqual(Permissions.AllowAdministerPermissions, catalog.RegisteredPermissions["Admin"].Actions[0].RuleName); }
public void AdminModuleInitializerGetsRegisterOnSiteMapAdministerPermissionsAsChildNode() { TestableModule module = new TestableModule(); SiteMapBuilderService service = new SiteMapBuilderService(); module.TestRegisterSiteMapInformation(service); SiteMapNodeInfo node = service.GetChildren(service.RootNode.Key)[0]; Assert.AreEqual(1, service.GetChildren(node.Key).Count); Assert.AreEqual("AllowAdministerPermissions", service.GetAuthorizationRule(service.GetChildren(node.Key)[0].Key)); }