コード例 #1
0
        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");
            }
        }
コード例 #2
0
ファイル: HttpHelper.cs プロジェクト: kronovecta/MediaRequest
 public async Task <HttpResponseMessage> GetMovie(GetSingleExistingMovieRequest request)
 {
     return(await _radarrClient.Client.GetAsync($"api/movie/{request.RadarrMovieId}?apikey={_keys.Radarr}"));
 }