/// <inheritdoc /> public async Task <Stream> GetReceiptAsync( string transactionId, CancellationToken cancellationToken = default) { return(await retryPolicy .ExecuteAsync( ct => client.GetReceiptAsync( transactionId, ct), cancellationToken)); }
public async Task when_GetReceipt_is_called_then_we_should_have_called_the_filereceipt_get_once() { var mockHttp = new MockHttpMessageHandler(); mockHttp.Expect("http://localhost/api/file/receipt/transaction ID") .Respond(HttpStatusCode.OK); using (var httpClient = mockHttp.ToHttpClient()) { var signhostApiClient = new SignHostApiClient(settings, httpClient); var receipt = await signhostApiClient.GetReceiptAsync("transaction ID"); } mockHttp.VerifyNoOutstandingExpectation(); }