Mercurial > repos > IBBoard.WarFoundry.API.Tests
diff API/Util/UnitEquipmentUtilTest.cs @ 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 | c026c02583ca |
line wrap: on
line diff
--- a/API/Util/UnitEquipmentUtilTest.cs Fri Nov 13 10:29:49 2009 +0000 +++ b/API/Util/UnitEquipmentUtilTest.cs Fri Nov 13 11:24:55 2009 +0000 @@ -326,7 +326,7 @@ unit.SetEquipmentAmount(equip2, 5); Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(3, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); - Assert.AreEqual(IBBMath.Percentage(3, 15), UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(50 - IBBMath.Percentage(5, 15), UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); Assert.AreEqual(50 - IBBMath.Percentage(5, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } @@ -358,7 +358,7 @@ unit.SetEquipmentAmount(equip2, 5); Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); - Assert.AreEqual(IBBMath.Percentage(3, 15), UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(50 - IBBMath.Percentage(5, 15), UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); Assert.AreEqual(10, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); }