public void Initialize() { _warehouses = new FakeRepository <Warehouse>(); _warehouse1 = new Warehouse { Name = "Hanger 18" }; _procrit = new Product { Id = 11190 }; _warehouse1.Requisitions = new List <Requisition>(); _warehouse1.Requisitions.Add(new Requisition { Product = _procrit, Quantity = 7, Restocks = new List <Restock> { new Restock() } }); _warehouse1.PickLists = new List <PickList>(); _warehouses.Add(_warehouse1); _clinic = new Customer { Name = "The Clinic", ShippingAddress = "1 My Way" }; _service = new InventoryAllocationService(_warehouses); }
public PlaceOrderHandler( SubscriberRegistry <OrderShipped> subscriptionRegistry) { _context = new FulfillmentDB(); _customerService = new CustomerService( _context.GetCustomerRepository()); _productService = new ProductService( _context.GetProductRepository()); _inventoryAllocationService = new InventoryAllocationService( _context.GetWarehouseRepository()); _pickListService = new PickListService( _context.GetPickListRepository()); _subscriptionRegistry = subscriptionRegistry; }
public FulfillmentService() { FulfillmentDB.Initialize(); FulfillmentDB context = new FulfillmentDB(); _customerService = new CustomerService( context.GetCustomerRepository()); _productService = new ProductService( context.GetProductRepository()); _inventoryAllocationService = new InventoryAllocationService( context.GetWarehouseRepository()); _pickListService = new PickListService( context.GetPickListRepository()); _messageQueue = new MsmqMessageQueueOutbound < Messages.PlaceOrder>( ".", typeof(Messages.PlaceOrder).FullName); }