static void Main(string[] args) { var omnivore = new CarnivoreOmnivore(); var meat = new Food(Origin.Animal); var plant = new Food(Origin.Vegetal); Console.WriteLine("Carnivore Twin eating Meat and Delegating plant food for Herbivore Twin."); Console.WriteLine(omnivore.EatFood(meat.Type)); Console.WriteLine(omnivore.EatFood(plant.Type)); Console.ReadKey(); }
public void CarnivoreTwinEatingPlant() { var omnivore = new CarnivoreOmnivore(); var plant = new Food(Origin.Vegetal); string eatingMessage = omnivore.EatFood(plant.Type); string eatingVegetalMessage = "Eating plant origin food."; Assert.AreEqual(eatingVegetalMessage, eatingMessage, true); }
public void CarnivoreTwinEatingMeat() { var omnivore = new CarnivoreOmnivore(); var meat = new Food(Origin.Animal); string eatingMessage = omnivore.EatFood(meat.Type); string eatingAnimalMessage = "Eating animal origin food."; Assert.AreEqual(eatingAnimalMessage,eatingMessage,true); }