public async Task GetSingleExistingMovieTest(string radarrMovieId) { // Arrange var request = new GetSingleExistingMovieRequest { RadarrMovieId = radarrMovieId }; var handler = new GetSingleExistingMovieHandler(_radarrClient); GetSingleExistingMovieResponse 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()); }, "Parameter threw HttpRequestException error"); } }
public async Task <HttpResponseMessage> GetMovie(GetSingleExistingMovieRequest request) { return(await _radarrClient.Client.GetAsync($"api/movie/{request.RadarrMovieId}?apikey={_keys.Radarr}")); }