public void Buy7Jeansfor5() { ShoppingCart sc = new ShoppingCart(); Product jean = new Jean(20); sc.Add(jean, 7); double totalPrice = sc.TotalValue(); Assert.AreEqual(100, totalPrice); }
public string GetPants(int id, int weight, int stock, int inseam, int size) { Jean jean = new Jean { ID = id, Weight = weight, Stock = stock, Inseam = inseam, WaistSize = size }; return(jean.GetFeatures()); }
public void InitShoppingCart() { ShoppingCart sc = new ShoppingCart(); Product productA = new tshirt(10); Product productB = new Jean(20); sc.Add(productA); sc.Add(productB); Assert.AreEqual(2, sc.Products.Count); }
public void Buy2Jeans2Tshirt() { ShoppingCart sc = new ShoppingCart(); Product jean = new Jean(20); Product tshirt = new tshirt(10); sc.Add(jean, 2); sc.Add(tshirt, 2); double totalPrice = sc.TotalValue(); Assert.AreEqual(45, totalPrice); }
public void Sc1AddTshirtAndJean() { ShoppingCart sc = new ShoppingCart(); Product tshirt = new tshirt(10); Product jean = new Jean(20); sc.Add(tshirt); sc.Add(jean); double totalPrice = sc.TotalValue(); Assert.AreEqual(30, totalPrice); }