Ejemplo n.º 1
0
        public void RoleExistsTestInvalidRoleName()
        {
            try
            {
                AppleseedRoleProvider provider = Roles.Provider as AppleseedRoleProvider;

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

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