Пример #1
0
        private bool StandaloneCrditsAreEquivalent(StandaloneCredits credit1, StandaloneCredits credit2)
        {
            if (!credit1.Id().Equals(credit2.Id()) ||
                !credit1.Status().Equals(credit2.Status()) ||
                !credit1.Amount().Equals(credit2.Amount()) ||
                !credit1.CustomerIp().Equals(credit2.CustomerIp()) ||
                !credit1.MerchantRefNum().Equals(credit2.MerchantRefNum()) ||
                !ProfilesAreEquivalent(credit1.Profile(), credit2.Profile()) ||
                !BillingDetailsAreEquivalent(credit1.BillingDetails(), credit2.BillingDetails()))
            {
                return(false);
            }

            return(true);
        }
Пример #2
0
        public async Task When_I_lookup_an_ach_standalone_using_a_merchant_refnum_credit_Then_it_should_return_a_valid_ach_standalone_credit_async()
        {
            _standaloneCredit = await _achDirectDebitService.SubmitAsync(_standaloneCredit);

            var returnedStandaloneCredit = await _achDirectDebitService.GetStandaloneCreditsAsync(StandaloneCredits.Builder()
                                                                                                  .MerchantRefNum(_standaloneCredit.MerchantRefNum())
                                                                                                  .Build());

            var result = returnedStandaloneCredit.GetResults();

            Assert.That(result.Count, Is.EqualTo(1));
            Assert.That(StandaloneCrditsAreEquivalent(_standaloneCredit, result.First()));
        }