Example #1
0
        public void TestFindFirstCat()
        {
            AnimalShelter shelter = new AnimalShelter(new Dog("Moby"));

            shelter.Enqueue(new Cat("Boots"));
            Assert.Equal("Boots", shelter.FindFirst(typeof(Cat)).Name);
        }
Example #2
0
        public void TestFindFirstNotFound()
        {
            AnimalShelter shelter = new AnimalShelter(new Dog("Moby"));

            Assert.Throws <Exception>(() => shelter.FindFirst(typeof(Cat)));
        }