Mercurial > repos > IBBoard.WarFoundry.API.Tests
changeset 27:0676f6a1ee9d
Fixes #198: Add equipment slots
* Add unit tests for min percentage amounts
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 28 Oct 2009 20:52:50 +0000 |
parents | e6bf9b5e1b94 |
children | 2395dc131401 |
files | API/Util/UnitEquipmentUtilTest.cs |
diffstat | 1 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/API/Util/UnitEquipmentUtilTest.cs Wed Oct 28 20:43:33 2009 +0000 +++ b/API/Util/UnitEquipmentUtilTest.cs Wed Oct 28 20:52:50 2009 +0000 @@ -24,6 +24,7 @@ Assert.AreEqual(4, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(4, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(4.0/15*100, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(4.0/15*100, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -35,6 +36,7 @@ Assert.AreEqual(4, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(4.0/15*100, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(1.0/15*100, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -48,6 +50,7 @@ Assert.AreEqual(2, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(2, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(2.0/15*100, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(2.0/15*100, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -61,6 +64,7 @@ Assert.AreEqual(2, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(2.0/15*100, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(1.0/15*100, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -74,6 +78,7 @@ Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(3, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(3.0/15*100, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(3.0/15*100, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -87,6 +92,7 @@ Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(3.0/15*100, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(1.0/15*100, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -100,6 +106,7 @@ Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(7, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(50, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -113,6 +120,7 @@ Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(5, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(5.0/15*100, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -129,6 +137,7 @@ Assert.AreEqual(1, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(1.0/15*100, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(1.0/15*100, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -145,6 +154,7 @@ Assert.AreEqual(2, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(2.0/15*100, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(1.0/15*100, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -156,6 +166,7 @@ Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(7, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(50, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -167,6 +178,7 @@ Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(3, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(25, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -193,6 +205,7 @@ Assert.AreEqual(2, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(2.0/15*100, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(1.0/15*100, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -206,6 +219,7 @@ Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(3, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(25, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(25, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -219,6 +233,7 @@ Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(25, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(10, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -232,6 +247,7 @@ Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(7, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(50, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -245,6 +261,7 @@ Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(3, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(25, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -261,6 +278,7 @@ Assert.AreEqual(2, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(2, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(2.0/15*100, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(2.0/15*100, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -277,6 +295,7 @@ Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(3, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(3.0/15*100, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(3.0/15*100, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()] @@ -293,6 +312,7 @@ Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip)); Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip)); Assert.AreEqual(3.0/15*100, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + Assert.AreEqual(1.0/15*100, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); } [Test()]