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(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 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 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 SelectiveInvoiceDiscountSubmitter(ISelectInvoiceService selectInvoiceService) =>
/// <summary> /// /// </summary> /// <param name="selectInvoiceService"></param> /// <param name="selectiveInvoiceDiscountProduct"></param> public SelectedInvoiceDiscountService(ISelectInvoiceService selectInvoiceService, ISelectiveInvoiceDiscountProduct selectiveInvoiceDiscountProduct) { _selectInvoiceService = selectInvoiceService; _selectiveInvoiceDiscountProduct = selectiveInvoiceDiscountProduct; }
public SelectInvoiceServiceWrapper(decimal invoiceAmount, decimal advancePercentage, ISelectInvoiceService selectInvoiceService) { _invoiceAmount = invoiceAmount; _advancePercentage = advancePercentage; _selectInvoiceService = selectInvoiceService; }
public SelectiveInvoiceDiscountHandler(ISelectInvoiceService selectInvoiceService) { this._selectInvoiceService = selectInvoiceService; }
public SelectiveInvoiceDiscountServiceHandler() { service = StartUp.Scope.Resolve <ISelectInvoiceService>(); }
public SelectInvoiceDiscountProcessor(ISellerApplication application, ISelectInvoiceService service) { this.application = application; this.service = service; }
public SelectiveInvoiceDiscountHandler(ISelectInvoiceService invoiceService) { this.invoiceService = invoiceService; }
public SelectiveInvoiceDiscountHandler(ISelectInvoiceService selectInvoiceService) { _selectInvoiceService = selectInvoiceService ?? throw new ArgumentNullException(nameof(selectInvoiceService)); }
public SelectiveInvoiceStrategy(ISelectInvoiceService selectInvoiceService) { _selectInvoiceService = selectInvoiceService; }
public SelectInvoiceServiceWorker(IServiceProvider serviceProvider) { _selectInvoiceService = (ISelectInvoiceService)serviceProvider.GetService(typeof(ISelectInvoiceService)); }
public SelectiveInvoiceDiscountService(ISelectInvoiceService selectInvoiceService) { this.selectInvoiceService = selectInvoiceService ?? throw new ArgumentNullException(nameof(selectInvoiceService)); }
public SubmitApplicationStrategyFactory(ISelectInvoiceService selectInvoiceService, IConfidentialInvoiceService confidentialInvoiceWebService, IBusinessLoansService businessLoansService) { _selectInvoiceService = selectInvoiceService; _confidentialInvoiceWebService = confidentialInvoiceWebService; _businessLoansService = businessLoansService; }
public SelectiveInvoiceDiscount(ISelectInvoiceService selectInvoiceService) { _selectInvoiceService = selectInvoiceService; }
public SelectiveInvoiceApplicationHandler(ISelectInvoiceService selectInvoiceService) { _selectInvoiceService = selectInvoiceService; }
public SelectInvoiceServiceClient(ISelectInvoiceService selectInvoiceService) { _selectInvoiceService = selectInvoiceService; }