public InvoicesController(ICustomerDataService customerDataService, IInvoiceDataService invoiceDataService, ICommandHandler <InvoiceCustomerCommand> invoiceCustomerCommandHandler, ICommandHandler <ChangeInvoiceStatusCommand> changeInvoiceStatusCommandHandler) { _customerDataService = customerDataService ?? throw new ArgumentNullException(nameof(customerDataService)); _invoiceDataService = invoiceDataService ?? throw new ArgumentNullException(nameof(invoiceDataService)); _invoiceCustomerCommandHandler = invoiceCustomerCommandHandler ?? throw new ArgumentNullException(nameof(invoiceCustomerCommandHandler)); _changeInvoiceStatusCommandHandler = changeInvoiceStatusCommandHandler ?? throw new ArgumentNullException(nameof(changeInvoiceStatusCommandHandler)); }
public InvoicesControllerTests() { _customerDataService = A.Fake <ICustomerDataService>(); _invoiceDataService = A.Fake <IInvoiceDataService>(); _invoiceCustomerCommandHandler = A.Fake <ICommandHandler <InvoiceCustomerCommand> >(); _changeInvoiceStatusCommandHandler = A.Fake <ICommandHandler <ChangeInvoiceStatusCommand> >(); _sut = new InvoicesController(_customerDataService, _invoiceDataService, _invoiceCustomerCommandHandler, _changeInvoiceStatusCommandHandler); }
public InvoiceService(IInvoiceDataService invoice, IParameterDataService parameter) { _invoiceData = invoice; _parameterData = parameter; }