コード例 #1
0
        public void AddContainerAddsContainer()
        {
            int expectedCount = 4;

            group.AddContainer(HabitationHandler.CreateHandlers().PickHabitation(new Bowtruckle("Tree", 24)));
            Assert.Equal(expectedCount, group.GetCount());
            InitGroup();
        }
コード例 #2
0
        public void HandlersReturnValidRoomForAnimals(Animal a, Habitation expected)
        {
            var recieved = HabitationHandler.CreateHandlers().PickHabitation(a);

            Assert.NotNull(recieved);
            Assert.Equal(expected.GetAnimal(), recieved.GetAnimal());
            Assert.Equal(expected.GetType(), recieved.GetType());
        }
コード例 #3
0
        public void GetAnimalContainerReturnsCorrectAnswerForValidInput(Animal a)
        {
            Habitation expected = HabitationHandler.CreateHandlers().PickHabitation(a);
            Habitation recieved = group.GetAnimalContainer(a.Name);

            Assert.NotNull(recieved);
            Assert.Equal(expected.GetAnimal(), recieved.GetAnimal());
            Assert.Equal(expected.GetType(), recieved.GetType());
        }
コード例 #4
0
        public void RemoveContainerReturnsFalseForNonExistingContainer()
        {
            bool recieved = group.RemoveContainer(HabitationHandler.CreateHandlers().PickHabitation(new Occamy("Fish", 44)));

            Assert.False(recieved);
        }
コード例 #5
0
 public void RemoveContainerReturnsFalseForNonExistingContainer()
 {
     Assert.False(Case.RemoveContainer(HabitationHandler.CreateHandlers().PickHabitation(new Occamy("Fish", 44))));
 }