public void Should_be_appended_to_the_coffee_description() { var testCoffee = new TestCoffee() { TestableCost = 3.50, Description = "Test coffee description" }; var condiment = new DarkRoastWithWhip(testCoffee); Assert.That(condiment.GetDescription, Is.EqualTo("Test coffee description with Whipped Cream")); }
public void Should_use_cost_method_to_calculate_price_for_menu(double cost) { var testType = new TestCoffee() { Description = "Testable coffee with price", TestableCost = cost }; var menu = new List <Beverage>() { testType }; var testCoffeeShop = new Store(menu, null, _writer); testCoffeeShop.PrintMenu(); A.CallTo(() => _writer.WriteLine(A <string> .That.Contains($"£{cost:F2}"))).MustHaveHappened(); }
public void Should_list_all_beverages_in_the_menu(string description) { var coffeeType = new DarkRoast(); var testType = new TestCoffee() { Description = description }; var menu = new List <Beverage>() { new DarkRoast(), new Espresso(), new HouseBlend(), new Decaf(), testType }; var testCoffeeShop = new Store(menu, null, _writer); testCoffeeShop.PrintMenu(); A.CallTo(() => _writer.WriteLine(A <string> .That.Contains(coffeeType.GetDescription()))).MustHaveHappened(); A.CallTo(() => _writer.WriteLine(A <string> .That.Contains(description))).MustHaveHappened(); }