public void WriteToFileTest()
        {
            string fake = "fake";

            var saveInput = new List<Order>();
            var testOrder = new Order();
            testOrder.OrderNumber = 1;
            testOrder.Name = "Smith";
            testOrder.State = "OH";
            testOrder.TaxRate = .10M;
            testOrder.ProductType = "Carpet";
            testOrder.Area = 10M;
            testOrder.CostPerSquareFoot = 2M;
            testOrder.LaborCostPerSquareFoot = 5M; 
            // normally this is where we would stop entering data and
            // and the Calculator would be called to finish computing the 
            // last four values for the order
            testOrder.MaterialCost = testOrder.Area * testOrder.CostPerSquareFoot;
            testOrder.LaborCost = testOrder.LaborCostPerSquareFoot * testOrder.Area;
            testOrder.Tax = testOrder.TaxRate * testOrder.MaterialCost;
            testOrder.Total = testOrder.MaterialCost + testOrder.LaborCost + testOrder.Tax;

            saveInput.Add(testOrder);
            var fm = new OrderManager(new OrderRepository());
            fm.SaveOrdersToFile(saveInput,fake);


        }
 public EditOrderWorkFlow(OrderManager orderManager, TaxRateManager taxRateManager, ProductManager productManager, FetchOrdersMatchingDate fetchOrdersMatchingDate)
 {
     _orderManager = orderManager;
     _taxRateManager = taxRateManager;
     _productManager = productManager;
     _fetchOrdersMatchingDate = fetchOrdersMatchingDate;
 }
        public void TestMockOrder()
        {
            
            var fm = new OrderManager(new OrderRepositoryMock());
            List<Order> fakeOrder= fm.LoadOrdersFromFile("doesItIgnoreThisFileName?");//yes, it just wanted a string input
            var Order = fakeOrder.Any(p => p.Name == "Becky");
            Assert.IsTrue(Order);

        }
        public void LoadFileTest()
        {
            string fake = "fake";

            var fm = new OrderManager(new OrderRepositoryMock());

            List<Order> actual = fm.LoadOrdersFromFile(fake);
            Assert.IsTrue(actual != null);

        }
        public Form1()
        {
            InitializeComponent();
            _kernel = new StandardKernel(new FlooringMasteryModule());
            _myOrderManger = _kernel.Get<OrderManager>();
            _myProductManager = _kernel.Get<ProductManager>();
            _myTaxRateManager = _kernel.Get<TaxRateManager>();
            cmbProdType.DataSource = _myProductManager.GetAllProducts().Select(x => x.ProductType).ToList();
            cmbState.DataSource = _myTaxRateManager.GetAllTaxRates().Select(x => x.State).ToList();
            cmbTaxRate.DataSource = _myTaxRateManager.GetAllTaxRates().Select(x => x.TaxPercent).ToList();


        }
 public RemoveOrderWorkFlow(FetchOrdersMatchingDate fetchOrdersMatchingDate, OrderManager orderManager)
 {
     _fetchOrdersMatchingDate = fetchOrdersMatchingDate;
     _orderManager = orderManager;
 }
 public FetchOrdersMatchingDate(OrderManager orderManager)
 {
     _orderManager = orderManager;
 }
 public AddOrderWorkFlow(TaxRateManager taxRateManager, OrderManager orderManager, ProductManager productManager)
 {
     _taxRateManager = taxRateManager;
     _orderManager = orderManager;
     _productManager = productManager;
 }