Ejemplo n.º 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'");
        }
Ejemplo n.º 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");
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 4
0
        public void StomachInheritsObjects()
        {
            Stomach organ = new Stomach();

            Assert.That(organ is Object);
        }
Ejemplo n.º 5
0
        public void ContentsFieldExists()
        {
            Stomach organ = new Stomach();

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

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