internal ServiceBase(IPaySimpleSettings settings, IValidationService validationService, IWebServiceRequest webServiceRequest, IServiceFactory serviceFactory) { this.settings = settings; this.validationService = validationService; this.webServiceRequest = webServiceRequest; this.serviceFactory = serviceFactory; }
public ServiceBase(IPaySimpleSettings settings) { this.settings = settings; this.validationService = new ValidationService(); this.webServiceRequest = new WebServiceRequest(new Serialization(), new SignatureGenerator(settings), settings.AutomaticRetryCount); this.serviceFactory = new ServiceFactory(settings); }
public AccountServiceTests() { settings = new PaySimpleSettings("1234567890", "UnitTests", "https://unittests.paysimple.com"); validationService = new Mock <IValidationService>(); webServiceRequest = new Mock <IWebServiceRequest>(); serviceFactory = new Mock <IServiceFactory>(); service = new AccountService(settings, validationService.Object, webServiceRequest.Object, serviceFactory.Object); }
public Harness() { var apiKey = ConfigurationManager.AppSettings["apiKey"]; var username = ConfigurationManager.AppSettings["username"]; settings = new PaySimpleSettings(apiKey, username, "https://sandbox-api.paysimple.com"); accountService = new AccountService(settings); customerService = new CustomerService(settings); paymentService = new PaymentService(settings); paymentScheduleService = new PaymentScheduleService(settings); }
public PaymentScheduleServiceTests() { settings = new PaySimpleSettings("1234567890", "UnitTests", "https://unittests.paysimple.com"); validationService = new Mock <IValidationService>(); webServiceRequest = new Mock <IWebServiceRequest>(); accountService = new Mock <IAccountService>(); customerService = new Mock <ICustomerService>(); serviceFactory = new Mock <IServiceFactory>(); accountService.Setup(m => m.CreateAchAccountAsync(It.IsAny <Ach>())).ReturnsAsync(new Ach { Id = 1 }); accountService.Setup(m => m.CreateCreditCardAccountAsync(It.IsAny <CreditCard>())).ReturnsAsync(new CreditCard { Id = 1 }); customerService.Setup(m => m.CreateCustomerAsync(It.IsAny <Customer>())).ReturnsAsync(new Customer { Id = 1 }); serviceFactory.Setup(m => m.GetAccountService()).Returns(accountService.Object); serviceFactory.Setup(m => m.GetCustomerService()).Returns(customerService.Object); service = new PaymentScheduleService(settings, validationService.Object, webServiceRequest.Object, serviceFactory.Object); }
internal AccountService(IPaySimpleSettings settings, IValidationService validationService, IWebServiceRequest webServiceRequest, IServiceFactory serviceFactory) : base(settings, validationService, webServiceRequest, serviceFactory) { }
public AccountService(IPaySimpleSettings settings) : base(settings) { }
public SignatureGenerator(IPaySimpleSettings settings) { this.settings = settings; }
public PaymentService(IPaySimpleSettings settings) : base(settings) { }
public ServiceFactory(IPaySimpleSettings settings) { this.settings = settings; }
public InternationalPaymentsTests(IPaySimpleSettings settings) { Pmnt = new PaymentService(settings); Cst = new CustomerService(settings); Acc = new AccountService(settings); }
public CustomerService(IPaySimpleSettings settings) : base(settings) { }