Пример #1
0
        public void PlaceAnimalOnce_SetAnimal_GetAnimal()
        {
            Cell   cell   = new TestCell("string");
            Animal animal = new TestAnimal(10, "testanimal");

            cell.PlaceAnimal(animal);
            Assert.AreEqual(animal, cell.GetAnimal());
        }
Пример #2
0
        public void PlaceAnimalTwice_SetTwoAnimals_GetFirstAnimal()
        {
            Cell   cell   = new TestCell("string");
            Animal first  = new TestAnimal(10, "first");
            Animal second = new TestAnimal(10, "second");

            cell.PlaceAnimal(first);
            cell.PlaceAnimal(second);
            Assert.AreNotEqual(second, cell.GetAnimal());
        }
Пример #3
0
        public void NameEmpty_SetEmpty_GetException()
        {
            string emptyString = string.Empty;

            Animal animalWithEmptyName = new TestAnimal(10, emptyString);
        }