public void Can_add_movie() { var newMovie = new Movie { Id = "tt0110912", Title = "Pulp Fiction", Rating = 8.9m, Director = "Quentin Tarantino", ReleaseDate = new DateTime(1994, 10, 24), TagLine = "Girls like me don't make invitations like this to just anyone!", Genres = new List<string> { "Crime", "Drama", "Thriller" }, }; base.Send<MoviesResponse>(new Movies { Movie = newMovie }, EndpointAttributes.HttpPut); var response = base.Send<MoviesResponse>(new Movies { Id = newMovie.Id }); Assert.That(newMovie.Equals(response.Movies[0]), Is.True); }
public void Can_add_movie() { var newMovie = new Movie { Id = "tt0110912", Title = "Pulp Fiction", Rating = 8.9m, Director = "Quentin Tarantino", ReleaseDate = new DateTime(1994, 10, 24), TagLine = "Girls like me don't make invitations like this to just anyone!", Genres = new List<string> { "Crime", "Drama", "Thriller" }, }; SendToEachEndpoint<MoviesResponse>(new Movies { Movie = newMovie }, HttpMethods.Put, null); SendToEachEndpoint<MoviesResponse>(new Movies { Id = newMovie.Id }, HttpMethods.Get, response => Assert.That(newMovie.Equals(response.Movies[0]), Is.True) ); }