public void GetOrdersTest()
 {
     var ops = new OrderOperations();
     var response = ops.GetOrders("06012014");
     var orderNums = response.OrderList.Count();
     Assert.AreEqual(orderNums, 3);
 }
        public void AddOrderOpsTest()
        {
            var ops = new OrderOperations();
            Order newOrder = new Order();
            newOrder.ProductInfo = new Product();

            newOrder.OrderNumber = 4;
            newOrder.CustomerName = "Dave";
            newOrder.TaxRate = (decimal)6.25;
            newOrder.ProductInfo.ProductType = "Wood";
            newOrder.Area = (decimal)100.00;
            newOrder.ProductInfo.CostPerSquareFoot = (decimal)5.15;
            newOrder.ProductInfo.LaborCostPerSquareFoot = (decimal)4.75;
            newOrder.MaterialCost = (decimal)515.00;
            newOrder.LaborCost = (decimal)475.00;
            newOrder.Tax = (decimal)61.88;
            newOrder.Total = (decimal)1051.88;
            newOrder.State = "OH";

            ops.AddOrder(newOrder, "06012014");

            var response = ops.GetOrders("06012014");
            var orderNum = response.OrderList.Count();

            Assert.AreEqual(orderNum, 4);
        }
        public void EditOrderOpsTest()
        {
            var ops = new OrderOperations();
            var response = ops.GetSpecificOrder("06012014", 1);

            var order = response.OrderList.FirstOrDefault(o => o.OrderNumber == 1);

            order.CustomerName = "Dave";

            ops.EditOrder(order, "06012014");
            response = ops.GetOrders("06012014");

            var editedOrder = response.OrderList.FirstOrDefault(o => o.OrderNumber == 1);

            Assert.AreEqual(editedOrder.CustomerName, "Dave");
        }
        public void RemoveOrderOpsTest()
        {
            var ops = new OrderOperations();
            ops.RemoveOrder("06012014", 2);
            ops.RemoveOrder("06012014", 1);
            var response = ops.GetOrders("06012014");
            var orderNums = response.OrderList.Count();

            Assert.AreEqual(orderNums, 1);
        }