public async Task <MovieDetailModel> Handle(GetMovieDetailsQuery request, CancellationToken cancellationToken) { var movieDetails = await _theMovieDbService.GetMovieDetails(request.MovieId); var movieDetailModel = await _movieQueryHelper.CreateDetailModel(movieDetails); return(movieDetailModel); }
private void GivenMovieIsInTheMovieDb() { _movieDetails = new MovieDetailsBuilder().WithReleaseDate("2019-12-25").Build(); _theMovieDbService.GetMovieDetails(Arg.Any <int>()).Returns(_movieDetails); }
private async Task <MovieDetails> GetMovieDetails(int theMovieDbId) { return(await _theMovieDbService.GetMovieDetails(theMovieDbId)); }