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");
        }
Ejemplo n.º 3
0
        public void VerifyAndProcessRequestWithNullHandlerThrows() {
            // Arrange
            PublicMvcHttpHandler handler = new PublicMvcHttpHandler();

            // Act
            ExceptionHelper.ExpectArgumentNullException(
                delegate {
                    handler.PublicVerifyAndProcessRequest(null, null);
                },
                "httpHandler");
        }
Ejemplo n.º 4
0
        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();
        }
Ejemplo n.º 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();
        }