Example #1
0
        public void IsInRoleTest()
        {
            SSOConfidence conf = new SSOConfidence();

            System.Web.HttpCookie testCookie = CookieTools.MakeCookie("TestCookie", "TestValue");
            string tte = CookieTools.NewExpiresTime(1).ToString();

            testCookie = CookieTools.AddTo(testCookie, CookieTools.SessionExpires, tte);
            testCookie = CookieTools.AddTo(testCookie, CookieTools.Roles, "NO_ACCESS");
            UserStatus uut = new UserStatus("Tester", false, testCookie, conf);

            Assert.IsTrue(uut.IsInRole("NO_ACCESS"), "Problem: IsInRole False");
        }