public async Task GetRecommendedTest(string tmdbId) { // Arrange var request = new GetRecommendedRequest { TMDBId = tmdbId }; var handler = new GetRecommendedHandler(_httpHelper, _servicePath); GetRecommendedResponse response = null; // Act try { response = await handler.Handle(request, new System.Threading.CancellationToken()); Assert.NotNull(response); } catch (Exception) { Assert.ThrowsAsync <HttpRequestException>(async() => { await handler.Handle(request, new System.Threading.CancellationToken()); }); } }
public async Task <HttpResponseMessage> GetRecommended(GetRecommendedRequest request) { return(await _tmdbClient.Client.GetAsync($"movie/{request.TMDBId}/recommendations?api_key=" + _keys.TMDB)); }