Пример #1
0
        public void kennel_has_1_dog_and_2_cats()
        {
            var donna = new Cat(Gender.Female);
            var cheeta = new Cat(Gender.Female);
            var lassie = new Dog(Gender.Female);

            Kennel.HousesPet(donna);
            Kennel.HousesPet(cheeta);
            Kennel.HousesPet(lassie);

            Assert.That(Kennel.NoOfDogs, Is.EqualTo(1));
            Assert.That(Kennel.NoOfCats, Is.EqualTo(2));
        }
Пример #2
0
 public void cheeta_is_not_fetching_shoes()
 {
     var cheeta = new Cat(Gender.Female);
     var exception = Assert.Throws<CatException>(() => cheeta.GetLoafers());
     Assert.That(exception.Message, Is.EqualTo("not gonna happen"));
 }
Пример #3
0
        public void dog_and_cat_has_different_IQ()
        {
            var cheeta = new Cat(Gender.Female);
            var lassie = new Dog(Gender.Female);
            cheeta.IQ = 100;
            lassie.IQ = 7;

            Assert.That(cheeta.IQ, Is.GreaterThan(lassie.IQ));
        }
Пример #4
0
 public void cheeta_is_female()
 {
     var cheeta = new Cat(Gender.Female);
     Assert.That(cheeta.Gender, Is.EqualTo(Gender.Female));
 }