public void RemoveVariety_Removes_Matches() { var cookieOrder = new CookieOrder("Tagalongs", 3); masterOrder.AddOrder(cookieOrder); masterOrder.RemoveVariety("Tagalongs"); Assert.Equal(0, masterOrder.GetTotalBoxes()); }
public void Removes_A_Variety() { MasterOrder newMaster = new MasterOrder(); newMaster.AddOrder(new CookieOrder("Thin Mints", 10)); newMaster.AddOrder(new CookieOrder("Thin Mints", 5)); newMaster.AddOrder(new CookieOrder("S'mores", 3)); newMaster.RemoveVariety("Thin Mints"); Assert.Equal("S'mores", newMaster.Orders[0].Variety); }
public void ShouldRemoveVariety() //RemoveVariety using LINQQQQQ!!! { //ARRANGE MasterOrder testorder = new MasterOrder(); //ACT testorder.AddOrder(new CookieOrder("fudge", 12)); testorder.AddOrder(new CookieOrder("fudge", 12)); testorder.AddOrder(new CookieOrder("mint", 12)); testorder.RemoveVariety("Fudge"); bool nottrue = testorder.orders.Exists(x => x.Variety == "Fudge"); //ASSERT Assert.False(nottrue); }
public void Remove_by_variety() { //ARRANGE MasterOrder order = new MasterOrder(); //ACT order.AddOrder(new CookieOrder("mint", 5)); order.AddOrder(new CookieOrder("Joescookies", 5)); order.AddOrder(new CookieOrder("mint", 5)); order.RemoveVariety("mint"); bool mybool = order.orders.Exists(x => x.Variety.Contains("mint")); //ASSERT Assert.False(mybool); }