Exemple #1
0
        public void TestEatLunchNotEnoughMoney()
        {
            {
                PaymentCard card = new PaymentCard(8);
                card.EatLunch();

                // Assert
                Assert.AreEqual("The card has a balance of 8 euros", card.ToString(), "You cannot eat without money!");
            }
        }
Exemple #2
0
        public void TestEatLunch()
        {
            {
                PaymentCard card = new PaymentCard(12.6);
                card.EatLunch();

                // Assert
                Assert.AreEqual("The card has a balance of 2 euros", card.ToString(), "Eating Lunch should cost 10.6!");
            }
        }