public async Task GetMovieDetails_WhenCorrectImdbId_ShouldReturnMovie() { // Arrange var request = new MovieDetailsRequest(_omdbSettings.ApiKey, new ImdbId("tt0096895")) { PlotType = PlotType.Full, }; // Act var response = await _client.GetMovieDetails(request); // Assert response.ShouldBeSuccessful(); }
public async Task SearchMoviesAndGetMovieDetails_PropertiesShouldMatch() { // Arrange & Act var searchRequest = new SearchMovieRequest(_omdbSettings.ApiKey, "Batman"); var searchResults = await _client.SearchMovies(searchRequest); var searchResult = searchResults.Search.ToList()[0]; var detailsRequest = new MovieDetailsRequest(_omdbSettings.ApiKey, new ImdbId(searchResult.ImdbId)); var detailsResult = await _client.GetMovieDetails(detailsRequest); // Assert detailsResult.ImdbId.ShouldBe(searchResult.ImdbId); detailsResult.Title.ShouldBe(searchResult.Title); detailsResult.Year.ShouldBe(searchResult.Year); }