public void PrintShoppingCart(ShoppingCart cart) {
     Console.WriteLine("Shopping Cart");
     Console.WriteLine("-------------");
     foreach (LineItem lineItem in cart.GetLineItems()) {
         Console.WriteLine("- {0}, Qty: {1}, Regular Price: ${2}",
             lineItem.Item.ItemName,
             lineItem.Quantity,
             String.Format("{0:0.00}",lineItem.PricePerUnit));
         if (lineItem.Promotion != null) {
             Console.WriteLine("    Promotion Applied: {0}", lineItem.Promotion.GetPromotionDescription());
             List<string> promotionText = lineItem.Promotion.GetPromotionText(lineItem);
             foreach (string textLine in promotionText) {
                 Console.WriteLine("    {0}", textLine);
             }                    
         }
         Console.WriteLine("                                                               Cost: ${0}", String.Format("{0:0.00}",lineItem.TotalCost));
     }
     Console.WriteLine("-------------");
     Console.WriteLine("Total Bill: ${0}", String.Format("{0:0.00}",cart.GetTotal()));
 }
        public void GetTotalTest_validTotalsReturned() {
            ShoppingCart cart = new ShoppingCart();
            Item apple = new Item("Apple");
            Item bananas = new Item("Bananas");

            cart.AddItem(apple, 3);
            cart.AddItem(bananas, 3);

            LineItem applesLineItem = cart.GetLineItemForItem(apple);
            applesLineItem.PricePerUnit = 2.00;

            LineItem bananasLineItem = cart.GetLineItemForItem(bananas);
            bananasLineItem.PricePerUnit = 3.00;

            Assert.AreEqual(15.00, cart.GetTotal());
        }