Beispiel #1
0
        public void AcceptWhenCookieAuthIsEnabled()
        {
            var authOptions = new AuthOptions {
                EnableCookieAuth = true
            };
            var constraint = new AuthActionsConstraint(authOptions);

            var result = constraint.Accept(null);

            Assert.True(result);
        }
Beispiel #2
0
        public void DenyWhenCookieAuthIsDisabled()
        {
            var authOptions = new AuthOptions {
                EnableCookieAuth = false
            };
            var constraint = new AuthActionsConstraint(authOptions);

            var result = constraint.Accept(null);

            Assert.False(result);
        }