public void RemoveAttackTest1() { AttackCollectionValue target = new AttackCollectionValue(); target.FromXML(LoadableXML); AttackCollectionValue.AttackValue attack = null; bool expected = true; bool actual; int remainingCapabilityPercentage = 40; attack = target.GetCurrentAttacks()[1]; actual = target.RemoveAttack(attack); Assert.AreEqual(expected, actual); Assert.AreEqual(remainingCapabilityPercentage, target.GetCurrentAttacks()[1].percentageApplied); }
public void RemoveAttackTest() { AttackCollectionValue target = new AttackCollectionValue(); target.FromXML(LoadableXML); string capabilityName = "Missile"; string targetObjectId = "MyTarget"; string attackingObjectId = "MyAttacker"; int attackStartTime = 8; int remainingCapabilityPercentage = 40; bool expected = true; bool actual; actual = target.RemoveAttack(capabilityName, targetObjectId, attackingObjectId, attackStartTime); Assert.AreEqual(expected, actual); Assert.AreEqual(remainingCapabilityPercentage, target.GetCurrentAttacks()[1].percentageApplied); }