コード例 #1
0
        private PaymentService CreatePaymentService(IBankApiHttpClient bankApiHttpClient = null, IPaymentDetailsRepository paymentDetailsRepository = null, ICurrencyRepository currencyRepository = null)
        {
            if (bankApiHttpClient == null)
            {
                bankApiHttpClient = SetupBankApiHttpClientMock();
            }

            if (paymentDetailsRepository == null)
            {
                paymentDetailsRepository = SetupPaymentDetailsRepositoryMock();
            }

            if (currencyRepository == null)
            {
                currencyRepository = SetupCurrencyRepositoryMock();
            }

            return(new PaymentService(bankApiHttpClient, paymentDetailsRepository, currencyRepository));
        }
コード例 #2
0
 public PaymentService(IBankApiHttpClient bankApiHttpClient, IPaymentDetailsRepository paymentDetailsRepository, ICurrencyRepository currencyRepository)
 {
     _bankApiClient            = bankApiHttpClient;
     _paymentDetailsRepository = paymentDetailsRepository;
     _currencyRepository       = currencyRepository;
 }