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

                IList <RainbowRole> roles = provider.GetAllRoles(Roles.ApplicationName);
                Assert.AreEqual(4, roles.Count);
                Assert.AreEqual("All Users", roles[0].Name);
                Assert.AreEqual("Authenticated Users", roles[1].Name);
                Assert.AreEqual("Unauthenticated Users", roles[2].Name);
                Assert.AreEqual("Admins", roles[3].Name);
            }
            catch (Exception ex) {
                Console.WriteLine(ex.Message);
                Assert.Fail("Error in GetAllRolesTest2" + ex.Message, ex);
            }
        }