Example #1
0
        public void KnowIfItHasACertainPrivilege()
        {
            AdminRole adminRole = AdminRole.GetInstance();

            ICollection <Privilege> adminPrivileges = adminRole.Privileges;
            Privilege firstPrivilege = adminPrivileges.ElementAt(FIRST_POSITION);

            Assert.IsTrue(adminRole.HasPrivilege(firstPrivilege));
        }
Example #2
0
        public void BeAbleToTellItDoesNotHaveANullPrivilege()
        {
            AdminRole adminRole = AdminRole.GetInstance();

            Assert.IsFalse(adminRole.HasPrivilege(null));
        }