Exemplo n.º 1
0
 public void AddStuffToCartCount()
 {
     ShoppingCartActions cartActs = new ShoppingCartActions();
     cartActs.AddToCart(1);
     cartActs.AddToCart(2);
     Assert.AreEqual(2, cartActs.GetCount());
 }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
 public void NewCartStartsEmpty()
 {
     ShoppingCartActions cartActs = new ShoppingCartActions();
     Assert.AreEqual(0, cartActs.GetCount());
 }