public async Task When_I_lookup_an_auth_using_an_auth_id_Then_it_should_return_a_valid_auth_async() { _auth = await _cardService.AuthorizeAsync(_auth); var returnedAuth = await _cardService.GetAsync(new Authorization(_auth.Id())); Assert.That(returnedAuth.Status(), Is.EqualTo("COMPLETED")); Assert.That(AuthorizationsAreEquivalent(_auth, returnedAuth), Is.True); }
public void When_I_get_an_auth_with_invalid_id_Then_it_should_throw_EntityNotFoundException_async() { Assert.ThrowsAsync <Paysafe.Common.EntityNotFoundException> (async() => await _cardPaymentService.GetAsync(new Authorization("Invalid_id"))); }