Example #1
0
        public void HerbivoreKilledTest()
        {
            var rng      = new Random();
            var testHerb = new Herbivore(rng);

            Assert.True(testHerb.IsAlive);
            testHerb.Kill();
            Assert.False(testHerb.IsAlive);
        }
Example #2
0
        public void HerbivoreAlreadyDeadTest()
        {
            // Check if IsAlive is set properly, or if it flips
            var rng      = new Random();
            var testHerb = new Herbivore(rng);

            testHerb.IsAlive = false;
            testHerb.Kill();
            Assert.False(testHerb.IsAlive);
        }