public async Task GetMovieByTitle(string title, string id) { //Act var movie = await _movieRepository.GetMovieByTitle(title); //Assert movie.Id.Should().Be(id); }
public async Task <Movie> GetMovieByTitle(string title) { var movieModel = await _movieRespository.GetMovieWithGenre(x => x.Title.ToLower() == title.ToLower()); if (movieModel != null) { movieModel.Poster = await DownloadMoviePoster(movieModel); return(movieModel); } movieModel = await _thirdPartyMovieRepository.GetMovieByTitle(title); if (movieModel != null) { movieModel.Poster = await DownloadMoviePoster(movieModel); } await AddMovie(movieModel); return(movieModel); }