public void OrdersTestsInitialize() { Resolve <IDbConnectionFactory>().DeleteAllTestData(); _orderPricesCommand = CreateOrderPricesCommand(); _purchasesCommand = CreatePurchasesCommand(); _ordersCommand = CreateOrdersCommand(_purchasesCommand); }
public OrdersCommand(IOrdersRepository repository, IOrderPricesCommand orderPricesCommand, IProductsQuery productsQuery, IAllocationsCommand allocationsCommand, IAllocationsQuery allocationsQuery, IPurchasesCommand purchasesCommand) { _repository = repository; _orderPricesCommand = orderPricesCommand; _productsQuery = productsQuery; _allocationsCommand = allocationsCommand; _allocationsQuery = allocationsQuery; _purchasesCommand = purchasesCommand; }
private IOrdersCommand CreateOrdersCommand(IPurchasesCommand purchasesCommand) { return(new OrdersCommand( new OrdersRepository(Resolve <IDataContextFactory>(), new MockAdjustmentPersister()), new OrderPricesCommand(Resolve <ICreditCardsQuery>(), new MockAdjustmentPersister()), _productsQuery, Resolve <IAllocationsCommand>(), _allocationsQuery, purchasesCommand)); }
protected Order CreateOrder(IPurchasesCommand puchasesCommand) { var product = _productsQuery.GetProduct("Contacts5"); IOrdersCommand ordersCommand = new OrdersCommand( Resolve <IOrdersRepository>(), Resolve <IOrderPricesCommand>(), _productsQuery, Resolve <IAllocationsCommand>(), Resolve <IAllocationsQuery>(), puchasesCommand); return(ordersCommand.PrepareOrder(new[] { product.Id }, null, null, CreateCreditCard(AustralianCreditCardNumber).CardType)); }
public OrdersReportsTests() { _purchasesCommand = CreatePurchasesCommand(); _ordersCommand = CreateOrdersCommand(_purchasesCommand); }