public void CheckIfAllowedTest_Failure_empty() { Animal animal = new Carnivour() { name = "Wolf", food = FoodType.Meat, size = BodySize.Medium }; Animal newAnimal = new Carnivour(); bool allowed = animal.CheckIfAllowed(newAnimal); }
public void CheckIfAllowedTest_Happy_Meateater_LargerSize() { Animal animal = new Carnivour() { name = "Wolf", food = FoodType.Meat, size = BodySize.Medium }; Animal newAnimal = new Carnivour() { name = "Lion", food = FoodType.Meat, size = BodySize.Big }; bool allowed = animal.CheckIfAllowed(newAnimal); Assert.IsFalse(allowed); }
public void CheckIfAllowedTest_Happy_Planteater_SmallerSize() { Animal animal = new Carnivour() { name = "Wolf", food = FoodType.Meat, size = BodySize.Medium }; Animal newAnimal = new Herbivour() { name = "mice", food = FoodType.Plants, size = BodySize.Small }; bool allowed = animal.CheckIfAllowed(newAnimal); Assert.IsFalse(allowed); }
public void CheckIfAllowedTest_Happy_Planteater_LargerSize() { IAnimal animal = new Carnivour() { name = "Wolf", food = FoodType.Meat, size = BodySize.Medium }; IAnimal newAnimal = new Herbivour() { name = "Elephant", food = FoodType.Plants, size = BodySize.Big }; bool allowed = animal.CheckIfAllowed(newAnimal); Assert.IsTrue(allowed); }