public void TestDrinkTooMuchCoffee() { { PaymentCard card = new PaymentCard(9); card.DrinkCoffee(); card.DrinkCoffee(); card.DrinkCoffee(); card.DrinkCoffee(); card.DrinkCoffee(); // Assert Assert.AreEqual("The card has a balance of 1 euros", card.ToString(), "You cannot drink coffee on credit!"); } }
public void TestDrinkTooMuchCoffee() { { PaymentCard card = new PaymentCard(9); card.DrinkCoffee(); card.DrinkCoffee(); card.DrinkCoffee(); card.DrinkCoffee(); card.DrinkCoffee(); // Assert Assert.AreEqual("The card has a balance of 1 euros", card.ToString(), "Do not exceed the balance to negative!"); } }
public void TestDrinkCoffee() { { PaymentCard card = new PaymentCard(10); card.DrinkCoffee(); // Assert Assert.AreEqual("The card has a balance of 8 euros", card.ToString(), "Drinking coffee should cost 2!"); } }