Beispiel #1
0
        public void DeleteRequestReturns405StatusCode()
        {
            var userRepository = new UserRepository();
            var userService    = new UserService(userRepository);
            var request        = new Request("/", "DELETE", "test");
            var controller     = new RootController(userService);

            var response = controller.HandlePostRequest(request.Body);
            var actual   = response.StatusCode;

            Assert.Equal(405, actual);
        }