示例#1
0
        public void CanReduceWorkerBeesHealth_ShouldReturn80()
        {
            var currentHealth = _workerBee.Damage(20);

            Assert.That(currentHealth, Is.Not.Null);
            Assert.AreEqual(currentHealth, 80f);
        }
        public void DeathTest1()
        {
            int       damageAmount = 31;
            WorkerBee bee          = new WorkerBee();

            bee.Damage(damageAmount);
            Assert.AreEqual(bee.Health, 69);
            bee.Damage(damageAmount);
            Assert.AreEqual(bee.Health, 69);
        }
示例#3
0
        public void WorkerDeadTest()
        {
            ///This test is to check if the worker is not still alive after 40 damage.
            WorkerBee bee1 = new WorkerBee();

            bee1.Damage(40);
            Assert.AreEqual(true, bee1.IsDead);
        }
示例#4
0
        public void WorkerAliveTest()
        {
            //This test is to check if the worker is still alive after 10 damage.
            WorkerBee bee1 = new WorkerBee();

            bee1.Damage(10);
            Assert.AreEqual(false, bee1.IsDead);
        }
        public void WhenDamagingAWorkerBeeForThirtyOne_ItIsDead()
        {
            // Arrange
            var workerBee = new WorkerBee();

            // Act
            workerBee.Damage(31);

            // Assert
            Assert.IsTrue(workerBee.IsDead);
        }
        public void WhenDamagingAWorkerBeeForThirtyPercent_ItIsAlive()
        {
            // Arrange
            var workerBee = new WorkerBee();

            // Act
            workerBee.Damage(30);

            // Assert
            Assert.IsFalse(workerBee.IsDead);
        }