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)); }
public PaymentService(IBankApiHttpClient bankApiHttpClient, IPaymentDetailsRepository paymentDetailsRepository, ICurrencyRepository currencyRepository) { _bankApiClient = bankApiHttpClient; _paymentDetailsRepository = paymentDetailsRepository; _currencyRepository = currencyRepository; }