Esempio n. 1
0
 public void AddStuffToCartCount()
 {
     ShoppingCartActions cartActs = new ShoppingCartActions();
     cartActs.AddToCart(1);
     cartActs.AddToCart(2);
     Assert.AreEqual(2, cartActs.GetCount());
 }
 protected void Page_PreRender(object sender, EventArgs e)
 {
     using (ShoppingCartActions cart = new ShoppingCartActions())
     {
         string cartString = string.Format("Takeout Box ({0} items)", cart.GetCount());
         cartCount.InnerText = cartString;
     }
 }
Esempio n. 3
0
 public void NewCartStartsEmpty()
 {
     ShoppingCartActions cartActs = new ShoppingCartActions();
     Assert.AreEqual(0, cartActs.GetCount());
 }