public void OnActionExecuting_ShouldNotAbortForUnauthenticatedUserIfNoCredentialsAreSpecified()
        {
            attribute = new RequireBasicAuthenticationAttribute("foo", null, null, authenticator);
            authenticator.IsAuthenticated().Returns(false);
            authenticator.IsAuthenticatedWithCredentials(Arg.Any<BasicAuthenticationCredentials>()).Returns(true);

            attribute.OnActionExecuting(attributeContext);

            AssertDidNotAbort();
        }
        public void OnActionExecuting_ShouldAbortForCorrectlyAuthenticatedUserIfCredentialsAreSpecified()
        {
            attribute = new RequireBasicAuthenticationAttribute("foo", "daniel", "saidi", authenticator);
            authenticator.IsAuthenticated().Returns(false);
            authenticator.IsAuthenticatedWithCredentials(Arg.Any<BasicAuthenticationCredentials>()).Returns(true);

            attribute.OnActionExecuting(attributeContext);

            AssertDidAbort();
        }