Beispiel #1
0
        public void RoleExistsTestInvalidRoleName()
        {
            try {
                RainbowRoleProvider provider = Roles.Provider as RainbowRoleProvider;

                bool isInRole = provider.RoleExists("invalidRole");
                Assert.IsFalse(isInRole);
            }
            catch (Exception ex) {
                Console.WriteLine(ex.Message);
                Assert.Fail("Error in RoleExistsTest2" + ex.Message, ex);
            }
        }
Beispiel #2
0
        public void RoleExistsTest1()
        {
            try {
                RainbowRoleProvider provider = Roles.Provider as RainbowRoleProvider;

                bool isInRole = provider.RoleExists("editors");
                Assert.IsTrue(isInRole);
            }
            catch (Exception ex) {
                Console.WriteLine(ex.Message);
                Assert.Fail("Error in RoleExistsTest1" + ex.Message, ex);
            }
        }