Ejemplo n.º 1
0
        public void NotFoundActionMethodShouldReturn404StatusCode()
        {
            var responseInstance = MockRepository.GenerateStrictMock<IResponse>();

            var homeController = new HomeController(MockRepository.GenerateMock<IDbExecutor>(), responseInstance);

            responseInstance
                .Expect(response => response.SetStatusCode(HttpStatusCode.NotFound));

            homeController.NotFound(new CategoryUrlBinding());

            responseInstance.VerifyAllExpectations();
        }