Пример #1
0
        public void Two_Carnivores_Cant_Be_Paired()
        {
            var Carnivore      = AnimalFactory.CreateBigCarnivore();
            var OtherCarnivore = AnimalFactory.CreateMediumCarnivore();

            Assert.IsFalse(Carnivore.CanBePaired(OtherCarnivore) && OtherCarnivore.CanBePaired(Carnivore));
        }
Пример #2
0
        public void Smaller_Carnivore_And_Larger_Herbivore_Can_Be_Paired()
        {
            var Carnivore = AnimalFactory.CreateMediumCarnivore();
            var Herbivore = AnimalFactory.CreateBigHerbivore();

            Assert.IsTrue(Carnivore.CanBePaired(Herbivore) && Herbivore.CanBePaired(Carnivore));
        }
Пример #3
0
        public void Smaller_Carnivore_And_Larger_Herbivore_Can_Fit_Together()
        {
            var Carnivore = AnimalFactory.CreateMediumCarnivore();
            var Herbivore = AnimalFactory.CreateBigHerbivore();

            var Cart = new Cart(10);

            Cart.CheckAndAddAnimal(Carnivore);

            Assert.IsTrue(Cart.CheckAndAddAnimal(Herbivore));
        }
Пример #4
0
        public void MediumCarnivore_LargeHerbivore_Sort()
        {
            var Animals = new List <Animal>();

            Animals.Add(AnimalFactory.CreateMediumCarnivore());
            Animals.Add(AnimalFactory.CreateBigHerbivore());

            var CircusTrain = new Train();

            CircusTrain.LoadAnimals(Animals);

            var Carts = CircusTrain.GetCarts();

            Assert.IsTrue(Carts.Count == 1);
        }