public void AcceptWhenCookieAuthIsEnabled() { var authOptions = new AuthOptions { EnableCookieAuth = true }; var constraint = new AuthActionsConstraint(authOptions); var result = constraint.Accept(null); Assert.True(result); }
public void DenyWhenCookieAuthIsDisabled() { var authOptions = new AuthOptions { EnableCookieAuth = false }; var constraint = new AuthActionsConstraint(authOptions); var result = constraint.Accept(null); Assert.False(result); }