public void VerifyAndProcessRequestWithNullHandlerThrows()
        {
            // Arrange
            PublicMvcHttpHandler handler = new PublicMvcHttpHandler();

            // Act
            Assert.ThrowsArgumentNull(
                delegate { handler.PublicVerifyAndProcessRequest(null, null); },
                "httpHandler");
        }
        public void VerifyAndProcessRequestWithNullHandlerThrows()
        {
            // Arrange
            PublicMvcHttpHandler handler = new PublicMvcHttpHandler();

            // Act
            Assert.ThrowsArgumentNull(
                delegate { handler.PublicVerifyAndProcessRequest(null, null); },
                "httpHandler");
        }
        public void VerifyAndProcessRequestWithNullHandlerThrows() {
            // Arrange
            PublicMvcHttpHandler handler = new PublicMvcHttpHandler();

            // Act
            ExceptionHelper.ExpectArgumentNullException(
                delegate {
                    handler.PublicVerifyAndProcessRequest(null, null);
                },
                "httpHandler");
        }
        public void ProcessRequestCallsExecute() {
            // Arrange
            PublicMvcHttpHandler handler = new PublicMvcHttpHandler();
            Mock<IHttpHandler> mockTargetHandler = new Mock<IHttpHandler>();
            mockTargetHandler.Setup(h => h.ProcessRequest(It.IsAny<HttpContext>())).Verifiable();

            // Act
            handler.PublicVerifyAndProcessRequest(mockTargetHandler.Object, null);

            // Assert
            mockTargetHandler.Verify();
        }
示例#5
0
        public void VerifyAndProcessRequestWithNullHandlerThrows()
        {
            // Arrange
            PublicMvcHttpHandler handler = new PublicMvcHttpHandler();

            // Act
            ExceptionHelper.ExpectArgumentNullException(
                delegate {
                handler.PublicVerifyAndProcessRequest(null, null);
            },
                "httpHandler");
        }
        public void ProcessRequestCallsExecute()
        {
            // Arrange
            PublicMvcHttpHandler handler           = new PublicMvcHttpHandler();
            Mock <IHttpHandler>  mockTargetHandler = new Mock <IHttpHandler>();

            mockTargetHandler.Setup(h => h.ProcessRequest(It.IsAny <HttpContext>())).Verifiable();

            // Act
            handler.PublicVerifyAndProcessRequest(mockTargetHandler.Object, null);

            // Assert
            mockTargetHandler.Verify();
        }