Exemplo n.º 1
0
        public BaseHttpHandlerUnauthorisedTests()
        {
            var authoriser = new Mock <IAuthoriser>();

            authoriser.Setup(x => x.IsAllowed()).Returns(false);

            var request = new HttpRequest("", "http://tempuri.org", "");

            _response = new HttpResponse(new StringWriter());

            var context = new HttpContext(request, _response);

            _sut = new SampleHandler(authoriser.Object);
            _sut.ProcessRequest(context);
        }