Ejemplo n.º 1
0
        public void Should_DeleteAnMovie_WhenDeleteingAnMovie()
        {
            //Arrange
            List <MovieModel> movies = new List <MovieModel>();

            movies = movieLogic.GetMovies(null);
            string name = movies[0].Name;

            //Act
            movieLogic.DeleteMovie(movies[0].Id);

            //Assert
            Assert.False(movies[0].Name != name);
        }
        public IActionResult DeleteMovie([FromBody] Movie movie)
        {
            _movieLogic.DeleteMovie(movie);

            return(new JsonResult(new { message = $"Deleted {movie.Title}" }));
        }