コード例 #1
0
        public void TestInitialization()
        {
            PermissionsCatalog catalog = new PermissionsCatalog();

            Assert.IsNotNull(catalog.RegisteredPermissions);
            Assert.AreEqual(0, catalog.RegisteredPermissions.Count);
        }
コード例 #2
0
        public void TestRegisterPermissionSet()
        {
            PermissionsCatalog catalog = new PermissionsCatalog();
            ModuleActionSet set = new ModuleActionSet("module", null);
            catalog.RegisterPermissionSet(set);

            Assert.AreEqual(set, catalog.RegisteredPermissions[set.ModuleName]);
        }