Mercurial > repos > IBDev-IBBoard.WarFoundry.API.Tests
changeset 31:c6082e4018f7
Re #209: equipmentslot Value problem
* Update unit tests to match new "check percentage, ignore numbers" min percentage calculation
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Fri, 13 Nov 2009 10:29:49 +0000 |
parents | 0cc21db8d60a |
children | 9bf542b76de2 |
files | API/Util/UnitEquipmentUtilTest.cs |
diffstat | 1 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/API/Util/UnitEquipmentUtilTest.cs Fri Nov 06 20:49:17 2009 +0000 +++ b/API/Util/UnitEquipmentUtilTest.cs Fri Nov 13 10:29:49 2009 +0000 @@ -107,7 +107,7 @@ Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(7, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); - Assert.AreEqual(IBBMath.Percentage(7, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); + Assert.AreEqual(50, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -182,7 +182,7 @@ Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(7, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); - Assert.AreEqual(IBBMath.Percentage(7, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); + Assert.AreEqual(50, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -194,7 +194,7 @@ Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(3, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); - Assert.AreEqual(IBBMath.Percentage(3, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); + Assert.AreEqual(25, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -222,7 +222,7 @@ Assert.AreEqual(2, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(IBBMath.Percentage(2, 15), UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); - Assert.AreEqual(IBBMath.Percentage(1, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); + Assert.AreEqual(10, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -236,7 +236,7 @@ Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(3, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(25, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); - Assert.AreEqual(IBBMath.Percentage(3, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); + Assert.AreEqual(25, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -250,7 +250,7 @@ Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(25, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); - Assert.AreEqual(IBBMath.Percentage(1, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); + Assert.AreEqual(10, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -264,7 +264,7 @@ Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(7, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); - Assert.AreEqual(IBBMath.Percentage(7, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); + Assert.AreEqual(50, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -278,7 +278,7 @@ Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(3, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); - Assert.AreEqual(IBBMath.Percentage(3, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); + Assert.AreEqual(25, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -310,7 +310,7 @@ Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); - Assert.AreEqual(IBBMath.Percentage(1, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); + Assert.AreEqual(10, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -342,7 +342,7 @@ Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); - Assert.AreEqual(IBBMath.Percentage(1, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); + Assert.AreEqual(10, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -359,7 +359,7 @@ 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(IBBMath.Percentage(1, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); + Assert.AreEqual(10, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()]