public void Does_PlayWithAllPets_Increase_All_HungerLevels_By_2()
        {
            petShelter.allShelteredPets.Add(newOrganicPet);
            petShelter.allShelteredPets.Add(newOrganicPet2);
            petShelter.allShelteredPets.Add(newOrganicPet3);

            petShelter.shelteredOrganicPets.Add(newOrganicPet);
            petShelter.shelteredOrganicPets.Add(newOrganicPet2);
            petShelter.shelteredOrganicPets.Add(newOrganicPet3);


            petShelter.PlayWithAllPets();

            Assert.Equal(5, petShelter.shelteredOrganicPets[0].HungerLevel);
            Assert.Equal(5, petShelter.shelteredOrganicPets[1].HungerLevel);
            Assert.Equal(5, petShelter.shelteredOrganicPets[2].HungerLevel);
        }
Esempio n. 2
0
        public void Play_Reduces_AllPets_Boredom_By_10()
        {
            //Arrange
            VirtualPetShelter myShelter = new VirtualPetShelter();

            myShelter.petsInShelter.Add(new OrganicPet());
            myShelter.petsInShelter.Add(new OrganicPet());
            myShelter.petsInShelter.Add(new OrganicPet());

            //Act
            myShelter.PlayWithAllPets();


            //Assert
            Assert.Equal(-10, myShelter.petsInShelter[0].Boredom);
            Assert.Equal(-10, myShelter.petsInShelter[1].Boredom);
            Assert.Equal(-10, myShelter.petsInShelter[2].Boredom);
        }