changeset 32:9bf542b76de2

Re #209: equipmentslot Value problem * Update unit tests to match new "check percentage, ignore numbers" max percentage calculation
author IBBoard <dev@ibboard.co.uk>
date Fri, 13 Nov 2009 11:24:55 +0000
parents c6082e4018f7
children 03a8ab5e90d6
files API/Util/UnitEquipmentUtilTest.cs
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/API/Util/UnitEquipmentUtilTest.cs	Fri Nov 13 10:29:49 2009 +0000
     1.2 +++ b/API/Util/UnitEquipmentUtilTest.cs	Fri Nov 13 11:24:55 2009 +0000
     1.3 @@ -326,7 +326,7 @@
     1.4  			unit.SetEquipmentAmount(equip2, 5);
     1.5  			Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip));
     1.6  			Assert.AreEqual(3, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip));
     1.7 -			Assert.AreEqual(IBBMath.Percentage(3, 15), UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
     1.8 +			Assert.AreEqual(50 - IBBMath.Percentage(5, 15), UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
     1.9  			Assert.AreEqual(50 - IBBMath.Percentage(5, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.10  		}
    1.11  		
    1.12 @@ -358,7 +358,7 @@
    1.13  			unit.SetEquipmentAmount(equip2, 5);
    1.14  			Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip));
    1.15  			Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip));
    1.16 -			Assert.AreEqual(IBBMath.Percentage(3, 15), UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
    1.17 +			Assert.AreEqual(50 - IBBMath.Percentage(5, 15), UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
    1.18  			Assert.AreEqual(10, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.19  		}
    1.20