示例#1
0
        public void ShieldOnlyDamage_Major()
        {
            MockShip mockShip = new MockShip();
            var      isAlive  = mockShip.ProcessDamage(0, 100, 0);

            Assert.AreEqual(0, mockShip.GetShield());
            Assert.AreEqual(10, mockShip.GetArmor());
            Assert.AreEqual(10, mockShip.GetHealth());
            Assert.IsTrue(isAlive);
        }
示例#2
0
        public void CombinedDamage_Test()
        {
            MockShip mockShip = new MockShip();
            var      isAlive  = mockShip.ProcessDamage(5, 3, 5);

            Assert.AreEqual(2, mockShip.GetShield());
            Assert.AreEqual(5, mockShip.GetArmor());
            Assert.AreEqual(10, mockShip.GetHealth());
            Assert.IsTrue(isAlive);
        }
示例#3
0
        public void GeneralDamage_Fatal()
        {
            MockShip mockShip = new MockShip();
            var      isAlive  = mockShip.ProcessDamage(35, 0, 0);

            Assert.AreEqual(0, mockShip.GetShield());
            Assert.AreEqual(0, mockShip.GetArmor());
            Assert.AreEqual(-5, mockShip.GetHealth());
            Assert.IsFalse(isAlive);
        }
示例#4
0
        public void GeneralDamage_Major()
        {
            MockShip mockShip = new MockShip();
            var      isAlive  = mockShip.ProcessDamage(25, 0, 0);

            Assert.AreEqual(0, mockShip.GetShield());
            Assert.AreEqual(0, mockShip.GetArmor());
            Assert.AreEqual(5, mockShip.GetHealth());
            Assert.IsTrue(isAlive);
        }
示例#5
0
        public void PiercingOnlyDamage_Fatal()
        {
            MockShip mockShip = new MockShip();
            var      isAlive  = mockShip.ProcessDamage(0, 0, 25);

            Assert.AreEqual(10, mockShip.GetShield());
            Assert.AreEqual(0, mockShip.GetArmor());
            Assert.AreEqual(-5, mockShip.GetHealth());
            Assert.IsFalse(isAlive);
        }
示例#6
0
        public void PiercingOnlyDamage_BleedToHull()
        {
            MockShip mockShip = new MockShip();
            var      isAlive  = mockShip.ProcessDamage(0, 0, 15);

            Assert.AreEqual(10, mockShip.GetShield());
            Assert.AreEqual(0, mockShip.GetArmor());
            Assert.AreEqual(5, mockShip.GetHealth());
            Assert.IsTrue(isAlive);
        }