public async Task When_I_lookup_an_auth_using_a_merchant_refNum_Then_it_should_return_a_valid_auth_async() { _auth = _cardService.Authorize(_auth); Pagerator <Authorization> auths = await _cardService.GetAuthsAsync(Authorization.Builder() .MerchantRefNum(_auth.MerchantRefNum()) .Build()); var authList = auths.GetResults(); Assert.That(authList.Count, Is.EqualTo(1)); Assert.That(AuthorizationsAreEquivalent(authList.First(), _auth)); }
public async Task When_I_lookup_a_verification_using_a_merchant_refNum_Then_it_should_return_a_valid_verification_async() { var ver = SampleFactory.CreateSampleVerification(); ver = await _cardService.VerifyAsync(ver); Pagerator <Verification> verifications = await _cardService.GetVerificationsAsync(Verification.Builder() .MerchantRefNum(ver.MerchantRefNum()) .Build()); var verList = verifications.GetResults(); Assert.That(verList.Count, Is.EqualTo(1)); Assert.That(VerificationsAreEquivalent(ver, verList.First())); }
public async Task When_I_lookup_a_settlement_using_a_merchant_refNum_Then_it_should_return_a_valid_settlement_async() { _auth = await _cardService.AuthorizeAsync(_auth); Settlement settle = Settlement.Builder() .MerchantRefNum(_auth.MerchantRefNum()) .AuthorizationId(_auth.Id()) .Build(); settle = await _cardService.SettlementAsync(settle); Pagerator <Settlement> settlements = await _cardService.GetSettlementsAsync(Settlement.Builder() .MerchantRefNum(settle.MerchantRefNum()) .Build()); var settleList = settlements.GetResults(); Assert.That(settleList.Count, Is.EqualTo(1)); Assert.That(SettlementsAreEquivalent(settle, settleList.First())); }
public async Task When_I_lookup_a_reversal_using_a_merchant_refNum_Then_it_should_return_a_valid_reversal_async() { _auth = await _cardService.AuthorizeAsync(_auth); AuthorizationReversal authReversal = AuthorizationReversal.Builder() .MerchantRefNum(_auth.MerchantRefNum()) .Amount(6666) .AuthorizationId(_auth.Id()) .Build(); authReversal = await _cardService.ReverseAuthAsync(authReversal); Pagerator <AuthorizationReversal> authReversals = await _cardService.GetAuthReversalsAsync(AuthorizationReversal.Builder() .MerchantRefNum(authReversal.MerchantRefNum()) .Build()); var authRevList = authReversals.GetResults(); Assert.That(authRevList.Count, Is.EqualTo(1)); Assert.That(AuthorizationReversalsAreEquivalent(authReversal, authRevList[0])); }