Exemplo n.º 1
0
        public void SortInWagons_10SmallCarnivores_TrainHasOneFullWagon()
        {
            //Arrange:
            _animals = _algo.GenerateSpecificAnimals(Size.Small, Diet.Carnivore, 10);

            //Act:
            _train.SortInWagons(_animals);

            //Assert:
            Assert.AreEqual(1, _train.Wagons.Count);
        }
Exemplo n.º 2
0
        public void CheckWagonCapacity_2LargeAnimals_IsWagonCompatibleFalse()
        {
            //Arrange:
            _animal = new Animal()
            {
                Diet = Diet.Carnivore, Size = Size.Large
            };

            //Act:
            _animals = _algo.GenerateSpecificAnimals(Size.Large, Diet.Herbivore, 2);
            Train train        = _algo.StartAlgorithms(_animals);
            bool  isCompatible = train.Wagons[0].DoesAnimalFitWagon(_animal);

            //Assert:
            Assert.IsFalse(isCompatible);
        }