Example #1
0
        public void VerifyGetAdditionalCoveragePart1()
        {
            DateTime orderDate = DateTime.Now;
            Order    order     = OrderFactory.GetOrderWithItemsAndProductAndCustomer(orderDate);

            //verify the customer name
            Debug.Assert(order.Customer.CustomerId == 1);
            Debug.Assert(order.Customer.CustomerName == "Customer 1");
            OrderDetail prod = order.OrderDetails[0];

            Debug.Assert(prod.Product.Cost == 7);
            Debug.Assert(prod.Product.Name == "Sample Product 1");
            Debug.Assert(prod.Product.Price == 11.50m);
            Debug.Assert(prod.Product.ProductId == 1);

            order.ClearCustomer();
            Debug.Assert(order.Customer == null);

            prod.ClearProduct();
            Debug.Assert(prod.Product == null);
        }