示例#1
0
        public void ChipsWithKetchupHappinessTest()
        {
            IFood food = new Chips();

            food = new Ketchup(food);
            double expected          = 110.25;
            double startingHappiness = 100;
            double happiness         = food.CalculateHappiness(startingHappiness);

            Assert.AreEqual(happiness, expected);
        }
示例#2
0
        public void HotDogWithKetchupHappinessTest()
        {
            IFood food = new HotDog();

            food = new Ketchup(food);
            double expected          = 104;
            double startingHappiness = 100;
            double happiness         = food.CalculateHappiness(startingHappiness);

            Assert.AreEqual(happiness, expected);
        }