コード例 #1
0
ファイル: UnitTest1.cs プロジェクト: BenSTay/DSA-old
        public void TestFindFirstCat()
        {
            AnimalShelter shelter = new AnimalShelter(new Dog("Moby"));

            shelter.Enqueue(new Cat("Boots"));
            Assert.Equal("Boots", shelter.FindFirst(typeof(Cat)).Name);
        }
コード例 #2
0
ファイル: UnitTest1.cs プロジェクト: BenSTay/DSA-old
        public void TestFindFirstNotFound()
        {
            AnimalShelter shelter = new AnimalShelter(new Dog("Moby"));

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