public ConfidentialInvoiceWebServiceWrapper(IConfidentialInvoiceService confidentialInvoiceWebService, decimal totalLedgerNetworth, decimal advancePercentage, decimal vatRate) { _confidentialInvoiceWebService = confidentialInvoiceWebService; _totalLedgerNetworth = totalLedgerNetworth; _advancePercentage = advancePercentage; _vatRate = vatRate; }
public ProductApplicationService(ISelectInvoiceService selectInvoiceService, IConfidentialInvoiceService confidentialInvoiceWebService, IBusinessLoansService businessLoansService) { _dispatcher = new ApplicationDispatcher(selectInvoiceService, confidentialInvoiceWebService, businessLoansService); }
public void Init() { _selectInvoiceService = A.Fake <ISelectInvoiceService>(); _confidentialInvoiceService = A.Fake <IConfidentialInvoiceService>(); _businessLoansService = A.Fake <IBusinessLoansService>(); _productApplicationService = new ProductApplicationService( _selectInvoiceService, _confidentialInvoiceService, _businessLoansService); A.CallTo(() => _selectInvoiceService.SubmitApplicationFor( A <string> ._, A <decimal> ._, A <decimal> ._)).Returns(codeOfSuccessfulAnswerFromService); A.CallTo( () => _confidentialInvoiceService.SubmitApplicationFor( A <CompanyDataRequest> ._, A <decimal> ._, A <decimal> ._, A <decimal> ._)).Returns(CreateSuccessApplicationResult()); A.CallTo( () => _businessLoansService.SubmitApplicationFor( A <CompanyDataRequest> ._, A <LoansRequest> ._)) .Returns(CreateSuccessApplicationResult()); }
/// <summary> /// /// </summary> /// <param name="selectInvoiceService"></param> /// <param name="confidentialInvoiceWebService"></param> /// <param name="businessLoansService"></param> public ProductApplicationService(ISelectInvoiceService selectInvoiceService, IConfidentialInvoiceService confidentialInvoiceWebService, IBusinessLoansService businessLoansService) { ServicesMediator = new ServicesMediator(); ServicesMediator.Add(typeof(ISelectInvoiceService), selectInvoiceService); ServicesMediator.Add(typeof(IConfidentialInvoiceService), confidentialInvoiceWebService); ServicesMediator.Add(typeof(IBusinessLoansService), businessLoansService); }
public ProductApplicationService( ISelectInvoiceService selectInvoiceService, IConfidentialInvoiceService confidentialInvoiceWebService, IBusinessLoansService businessLoansService) { // should be passed with DI directly inside processors locator = new ProcessorServiceLocator(selectInvoiceService, confidentialInvoiceWebService, businessLoansService); }
public ProductApplicationService(ISelectInvoiceService selectInvoiceService, IConfidentialInvoiceService confidentialInvoiceWebService, IBusinessLoansService businessLoansService) { _selectInvoiceService = selectInvoiceService; _confidentialInvoiceWebService = confidentialInvoiceWebService; _businessLoansService = businessLoansService; }
public ProductApplicationServiceTests() { _fixture = new Fixture(); sid = Substitute.For <ISelectInvoiceService>(); cid = Substitute.For <IConfidentialInvoiceService>(); loans = Substitute.For <IBusinessLoansService>(); _service = new ProductApplicationService(sid, cid, loans); }
// should be assinged directly inside proccessors via DI public ProcessorServiceLocator( ISelectInvoiceService selectInvoiceService, IConfidentialInvoiceService confidentialInvoiceWebService, IBusinessLoansService businessLoansService) { this.selectInvoiceService = selectInvoiceService; this.confidentialInvoiceWebService = confidentialInvoiceWebService; this.businessLoansService = businessLoansService; }
public ProductHandlerLocator(ISelectInvoiceService selectInvoiceService, IConfidentialInvoiceService confidentialInvoiceWebService, IBusinessLoansService businessLoansService) { _services = new Dictionary <Type, IProductHandler <IProduct, int> > { { typeof(BusinessLoans), new BusinessLoansHandler(businessLoansService) }, { typeof(ConfidentialInvoiceDiscount), new ConfidentialInvoiceDiscountHandler(confidentialInvoiceWebService) }, { typeof(SelectiveInvoiceDiscount), new SelectiveInvoiceDiscountHandler(selectInvoiceService) } }; }
public ProductApplicationService(ISelectInvoiceService selectInvoiceService, IConfidentialInvoiceService confidentialInvoiceWebService, IBusinessLoansService businessLoansService) { _selectInvoiceService = selectInvoiceService; _confidentialInvoiceWebService = confidentialInvoiceWebService; _businessLoansService = businessLoansService; _applicationResultMapper = new ApplicationResultMapper(); _sellerApplicationMapper = new SellerApplicationMapper(); _businessLoanMapper = new BusinessLoanMapper(); }
public ProductApplicationService CreateProductApplicationService(IBusinessLoansService businessLoansService, IConfidentialInvoiceService confidentialInvoiceService, ISelectInvoiceService selectInvoiceService) { return(new ProductApplicationService(new ISellerApplicationHandler[] { new BuisnessLoansHandler(businessLoansService), new ConfidentialInvoiceServiceHandler(confidentialInvoiceService), new SelectiveInvoiceDiscountHandler(selectInvoiceService), })); }
public ApplicationDispatcher(ISelectInvoiceService selectInvoiceService, IConfidentialInvoiceService confidentialInvoiceWebService, IBusinessLoansService businessLoansService) { _submitters = new List <IApplicationSubmitter> { new BusinessLoansSubmitter(businessLoansService), new ConfidentialInvoiceDiscountSubmitter(confidentialInvoiceWebService), new SelectiveInvoiceDiscountSubmitter(selectInvoiceService) }; }
public ProductApplicationService(ISelectInvoiceService selectInvoiceService, IConfidentialInvoiceService confidentialInvoiceWebService, IBusinessLoansService businessLoansService) { _selectInvoiceService = selectInvoiceService ?? throw new ArgumentNullException(nameof(selectInvoiceService)); _confidentialInvoiceWebService = confidentialInvoiceWebService ?? throw new ArgumentNullException(nameof(confidentialInvoiceWebService)); _businessLoansService = businessLoansService ?? throw new ArgumentNullException(nameof(businessLoansService)); }
public ProductHandlerStore(ISelectInvoiceService selectInvoiceService, IConfidentialInvoiceService confidentialInvoiceWebService, IBusinessLoansService businessLoansService) { _selectInvoiceService = selectInvoiceService; _confidentialInvoiceWebService = confidentialInvoiceWebService; _businessLoansService = businessLoansService; ProductHandlers = new List <IProductHandler> { new SelectiveInvoiceDiscountHandler(_selectInvoiceService), new ConfidentialInvoiceDiscountHandler(_confidentialInvoiceWebService), new BusinessLoansHandler(_businessLoansService) }; }
public ConfidentialInvoiceDiscountSubmitter(IConfidentialInvoiceService confidentialInvoiceWebService) =>
public ConfidentialInvoiceDiscountService(IConfidentialInvoiceService confidentialInvoiceService) { this.confidentialInvoiceService = confidentialInvoiceService ?? throw new ArgumentNullException(nameof(confidentialInvoiceService)); }
public ConfidentialInvoiceServiceClient(IConfidentialInvoiceService confidentialInvoiceService, ICompanyDataMapper companyDataMapper) { _confidentialInvoiceService = confidentialInvoiceService; _companyDataMapper = companyDataMapper; }
public ConfidentialInvoiceDiscountHandler(IConfidentialInvoiceService confidentialInvoiceService) { _confidentialInvoiceWebService = confidentialInvoiceService; }
public ConfidentialInvoiceDiscountServiceHandler() { service = StartUp.Scope.Resolve <IConfidentialInvoiceService>(); }
public ConfidentialInvoiceStrategy(IConfidentialInvoiceService confidentialInvoiceWebService) { _confidentialInvoiceWebService = confidentialInvoiceWebService; }
/// <summary> /// /// </summary> /// <param name="confidentialInvoiceService"></param> /// <param name="confidentialInvoiceDiscountProduct"></param> public ConfidentialInvoiceDiscountService(IConfidentialInvoiceService confidentialInvoiceService, IConfidentialInvoiceDiscountProduct confidentialInvoiceDiscountProduct) { _confidentialInvoiceService = confidentialInvoiceService; _confidentialInvoiceDiscountProduct = confidentialInvoiceDiscountProduct; }
public ConfidentialInvoiceDiscountHandler(IConfidentialInvoiceService confidentialInvoiceWebService) { _confidentialInvoiceWebService = confidentialInvoiceWebService ?? throw new ArgumentNullException(nameof(confidentialInvoiceWebService)); }
public SubmitApplicationStrategyFactory(ISelectInvoiceService selectInvoiceService, IConfidentialInvoiceService confidentialInvoiceWebService, IBusinessLoansService businessLoansService) { _selectInvoiceService = selectInvoiceService; _confidentialInvoiceWebService = confidentialInvoiceWebService; _businessLoansService = businessLoansService; }
public ConfidentialInvoiceServiceWorker(IServiceProvider serviceProvider) { _confidentialInvoiceService = (IConfidentialInvoiceService)serviceProvider.GetService(typeof(IConfidentialInvoiceService)); }
public ConfidentialInvoiceDiscountProcessor(ISellerApplication application, IConfidentialInvoiceService service) { this.application = application; this.service = service; }
public ConfidentialInvoiceApplicationHandler(IConfidentialInvoiceService confidentialInvoiceService) { _confidentialInvoiceService = confidentialInvoiceService; }