public void ServerError_Returns_Error_ViewResult()
        {
            // Arange
            string expectedViewName = "Error";
            var mockHttpContext = new Mock<HttpContextBase>();
            var response = new Mock<HttpResponseBase>();
            mockHttpContext.SetupGet(x => x.Response).Returns(response.Object);

            StaticController staticController = new StaticController() { 
                ControllerContext = new ControllerContext { 
                    HttpContext = mockHttpContext.Object } };

            // Act
            var result = staticController.ServerError() as ViewResult;

            // Asert
            Assert.IsNotNull(result, "Expected ViewResult to be returned");
            Assert.AreEqual(expectedViewName, result.ViewName);
        }
        public void NotFound_Returns_404_StatusCode()
        {
            // Arange
            int expectedCode = 404;
            var mockHttpContext = new Mock<HttpContextBase>();
            var response = new Mock<HttpResponseBase>();
            mockHttpContext.SetupGet(x => x.Response).Returns(response.Object);

            StaticController staticController = new StaticController() { 
                ControllerContext = new ControllerContext { 
                    HttpContext = mockHttpContext.Object } };

            // Act
            var result = staticController.NotFound() as ViewResult;

            // Asert
            Assert.IsNotNull(result, "Expected ViewResult to be returned");
            response.VerifySet(x => x.StatusCode = expectedCode, Times.Once());
        }