Exemple #1
0
        public void GrowlReturnsSpecificString()
        {
            Stomach organ = new Stomach();
            string  noise = organ.Growl();

            Assert.That(noise, Is.EqualTo("grrr"), "Expected Growl method to return 'grrr'");
        }
Exemple #2
0
        public void GrowlReturnsString()
        {
            Stomach organ = new Stomach();
            string  noise = organ.Growl();

            Assert.That(noise, Is.InstanceOf(typeof(string)), "Expected Growl method to return a string");
        }
Exemple #3
0
        public void DigestDecrementsContents()
        {
            Stomach organ  = new Stomach();
            int     start1 = organ.contents;

            int actual1   = organ.Digest(1);
            int expected1 = start1 - 1;

            int start2 = organ.contents;

            int actual2   = organ.Digest(3);
            int expected2 = start2 - 3;

            Assert.That(actual1, Is.EqualTo(expected1));
            Assert.That(actual2, Is.EqualTo(expected2));
        }
Exemple #4
0
        public void StomachInheritsObjects()
        {
            Stomach organ = new Stomach();

            Assert.That(organ is Object);
        }
Exemple #5
0
        public void ContentsFieldExists()
        {
            Stomach organ = new Stomach();

            Assert.That(() => organ.contents, Throws.Nothing);
        }
Exemple #6
0
        public void BloodTypePropertyExists()
        {
            Stomach organ = new Stomach();

            Assert.That(organ, Has.Property("BloodType"));
        }