Example #1
0
        public void CheckIfAnimalFitsWorksProperlyTest2()
        {
            //Arrange
            var animal1 = new Animal("LH", Enums.Size.Large, Enums.Diet.Herbivore);
            var animal2 = new Animal("MH", Enums.Size.Medium, Enums.Diet.Herbivore);
            var animal3 = new Animal("SH", Enums.Size.Small, Enums.Diet.Herbivore);
            var cart    = new Cart(animal3);

            //Act
            cart.AddAnimalToCart(animal2);

            //Assert
            Assert.IsTrue(cart.AnimalFits(animal1));
            foreach (var animal in cart.GetAnimals())
            {
                Console.WriteLine(animal.ToString());
            }
        }