Esempio n. 1
0
        public void TestShootAuxiliaryFireWithAmmo()
        {
            AssaultRifle testWeapon = new AssaultRifle();
            Enemy        testEnemy  = new Grunt();

            testWeapon.AddAuxiliaryAttachment();
            testWeapon.Toggle();

            testWeapon.Shoot(testEnemy);

            int ExpectedGruntHealth = Grunt.Grunt_Starting_Energy - AuxiliaryFire.Auxiliary_Fire_Damage_Points;
            int ActualGruntHealth   = testEnemy.EnergyRemaining;

            Assert.AreEqual(ExpectedGruntHealth, ActualGruntHealth);
        }
Esempio n. 2
0
        public void TestToggleWhenAuxiliaryFireIsOutOfAmmoAndAssaultRifleIsAvailable()
        {
            AssaultRifle testWeapon = new AssaultRifle();
            Enemy        testEnemy  = new Grunt();

            testWeapon.AddAuxiliaryAttachment();
            testWeapon.Toggle();

            testWeapon.auxiliaryFireWeapon.SetAmmo(0);
            testWeapon.Shoot(testEnemy);

            int ExpectedGruntHealth = Grunt.Grunt_Starting_Energy - AssaultRifle.Assault_Rifle_Damage_Points;
            int ActualGruntHealth   = testEnemy.EnergyRemaining;

            Assert.AreEqual(ExpectedGruntHealth, ActualGruntHealth);
        }