public void testHookSub() { Sandwich sub = new subSandwich(); string bread = "Whole wheat", meat = "Turkey", cheese = "Cheddar"; List <string> toppings = new List <string>(new string[] { "Lettuce", "Tomato", "Pickle", "Onions" }); List <string> condiments = new List <string>(new string[] { "Mayonnaise", "Mustard" }); bool meltedCheese = true, stay = true; sub.prepareRecipe(bread, meat, cheese, toppings, condiments, meltedCheese, stay); Assert.AreEqual(false, sub.hotCheese); }
public void Sub() { string bread = "Whole wheat", meat = "Turkey", cheese = "Cheddar"; List <string> toppings = new List <string>(new string[] { "Lettuce", "Tomato", "Pickle", "Onions" }); List <string> condiments = new List <string>(new string[] { "Mayonnaise", "Mustard" }); bool stay = true; Sandwich sub1 = new subSandwich(bread, meat, cheese, toppings, condiments, stay); Sandwich sub2 = new subSandwich(); sub2.prepareRecipe(bread, meat, cheese, toppings, condiments, false, stay); Assert.AreEqual(sub1.meat, sub2.meat); Assert.AreEqual(sub1.bread, sub2.bread); Assert.AreEqual(sub1.cheese, sub2.cheese); Assert.AreEqual(sub1.toppings, sub2.toppings); Assert.AreEqual(sub1.condiments, sub2.condiments); }