public void GetRealStateObjects_OnNotFoundResponse_ResourceNotFoundExceptionISThrown()
 {
     _httpClient       = new HttpClient(new ResourceNotFoundResponseHandler());
     _statisticsClient = new RealStateStatisticsClient(_httpClient, _mockPolicyService.Object);
     Assert.ThrowsAsync <ResourceNotFoundException>(async() =>
                                                    await _statisticsClient.GetRealStateObjects(true, _cancellationTokenSource.Token));
 }
 public void GetRealStateObjects_UnauthorizedResponse_UnauthorizedAccessExceptionISThrown()
 {
     _httpClient       = new HttpClient(new Unauthorized401ResponseHandler());
     _statisticsClient = new RealStateStatisticsClient(_httpClient, _mockPolicyService.Object);
     Assert.ThrowsAsync <UnauthorizedApiAccessException>(async() =>
                                                         await _statisticsClient.GetRealStateObjects(true, _cancellationTokenSource.Token));
 }
 public AgentStatisticsQueries(RealStateStatisticsClient statisticsClient)
 {
     _statisticsClient = statisticsClient ?? throw new ArgumentNullException(nameof(statisticsClient));
 }