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); }
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); }