public void Add_WhenAddFemaleBear_ReturnsTrue()
        {
            cage.Add(bear);

            Assert.NotEmpty(cage.Components);
            Assert.NotEmpty(cage.GetAnimals());
            Assert.Equal(bear, cage.Components[0]);
        }
Esempio n. 2
0
        public void IsContainerAlreadyContainsComponent_WhenTryToAddAlreadyExistingAnimal_ReturnsTrue()
        {
            bearCage.Add(bearFemaleCage);
            Bear bear = new BearFactory().CreateAnimal(Lab2Zoo.Models.Enums.MaleMode.Female) as Bear;

            bearFemaleCage.Add(bear);

            Assert.True(bearCage.IsContainerAlreadyContainsComponent(bear));
        }
Esempio n. 3
0
 public void Add_WhenAddMaleBeartoFemaleCage_ReturnsTypeAccessException()
 {
     Assert.Throws <TypeAccessException>(() => bearFemaleCage.Add(maleBear));
 }