private async Task ShouldAcceptDispute() { const string disputeId = "dsp_s5151531"; _apiClient.Setup(apiClient => apiClient.Post <EmptyResponse>($"disputes/{disputeId}/accept", _authorization, null, CancellationToken.None, null)) .ReturnsAsync(() => new EmptyResponse()); IDisputesClient client = new DisputesClient(_apiClient.Object, _configuration.Object); var response = await client.Accept(disputeId); response.ShouldNotBeNull(); }
private async Task ShouldGetEvidence() { const string disputeId = "dsp_s5151531"; var responseAsync = new DisputeEvidenceResponse(); _apiClient.Setup(apiClient => apiClient.Get <DisputeEvidenceResponse>($"disputes/{disputeId}/evidence", _authorization, CancellationToken.None)) .ReturnsAsync(() => responseAsync); IDisputesClient client = new DisputesClient(_apiClient.Object, _configuration.Object); var response = await client.GetEvidence(disputeId); response.ShouldNotBeNull(); }
private async Task ShouldQueryDispute() { var request = new DisputesQueryFilter(); var responseAsync = new DisputesQueryResponse(); _apiClient.Setup(apiClient => apiClient.Query <DisputesQueryResponse>("disputes", _authorization, request, CancellationToken.None)) .ReturnsAsync(() => responseAsync); IDisputesClient client = new DisputesClient(_apiClient.Object, _configuration.Object); var response = await client.Query(request); response.ShouldNotBeNull(); }
private async Task ShouldPutEvidenceDispute() { const string disputeId = "dsp_s5151531"; var request = new DisputeEvidenceRequest(); _apiClient.Setup(apiClient => apiClient.Put <EmptyResponse>($"disputes/{disputeId}/evidence", _authorization, request, CancellationToken.None, null)) .ReturnsAsync(() => new EmptyResponse()); IDisputesClient client = new DisputesClient(_apiClient.Object, _configuration.Object); var response = await client.PutEvidence(disputeId, request); response.ShouldNotBeNull(); }