/// <summary> /// Add a softdrink to the catalog /// </summary> /// <param name="drink">An object of a SoftDrink</param> public void Add(SoftDrink drink) { var temp = Get(drink.Label); if (_softDrinks.Contains(temp)) _softDrinks.Remove(temp); _softDrinks.Add(drink); }
public void AddSodaToCatalog() { var myCult = new SoftDrink("Cult", 9.95); catalog.Add(myCult); Assert.AreSame(myCult, catalog.Get("Cult")); }