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 diff
     1.1 --- a/API/Util/UnitEquipmentUtilTest.cs	Fri Nov 06 20:49:17 2009 +0000
     1.2 +++ b/API/Util/UnitEquipmentUtilTest.cs	Fri Nov 13 10:29:49 2009 +0000
     1.3 @@ -107,7 +107,7 @@
     1.4  			Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip));
     1.5  			Assert.AreEqual(7, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip));
     1.6  			Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
     1.7 -			Assert.AreEqual(IBBMath.Percentage(7, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
     1.8 +			Assert.AreEqual(50, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
     1.9  		}
    1.10  		
    1.11  		[Test()]
    1.12 @@ -182,7 +182,7 @@
    1.13  			Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip));
    1.14  			Assert.AreEqual(7, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip));
    1.15  			Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
    1.16 -			Assert.AreEqual(IBBMath.Percentage(7, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.17 +			Assert.AreEqual(50, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.18  		}
    1.19  		
    1.20  		[Test()]
    1.21 @@ -194,7 +194,7 @@
    1.22  			Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip));
    1.23  			Assert.AreEqual(3, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip));
    1.24  			Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
    1.25 -			Assert.AreEqual(IBBMath.Percentage(3, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.26 +			Assert.AreEqual(25, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.27  		}
    1.28  		
    1.29  		[Test()]
    1.30 @@ -222,7 +222,7 @@
    1.31  			Assert.AreEqual(2, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip));
    1.32  			Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip));
    1.33  			Assert.AreEqual(IBBMath.Percentage(2, 15), UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
    1.34 -			Assert.AreEqual(IBBMath.Percentage(1, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.35 +			Assert.AreEqual(10, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.36  		}
    1.37  		
    1.38  		[Test()]
    1.39 @@ -236,7 +236,7 @@
    1.40  			Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip));
    1.41  			Assert.AreEqual(3, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip));
    1.42  			Assert.AreEqual(25, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
    1.43 -			Assert.AreEqual(IBBMath.Percentage(3, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.44 +			Assert.AreEqual(25, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.45  		}
    1.46  		
    1.47  		[Test()]
    1.48 @@ -250,7 +250,7 @@
    1.49  			Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip));
    1.50  			Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip));
    1.51  			Assert.AreEqual(25, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
    1.52 -			Assert.AreEqual(IBBMath.Percentage(1, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.53 +			Assert.AreEqual(10, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.54  		}
    1.55  		
    1.56  		[Test()]
    1.57 @@ -264,7 +264,7 @@
    1.58  			Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip));
    1.59  			Assert.AreEqual(7, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip));
    1.60  			Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
    1.61 -			Assert.AreEqual(IBBMath.Percentage(7, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.62 +			Assert.AreEqual(50, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.63  		}
    1.64  		
    1.65  		[Test()]
    1.66 @@ -278,7 +278,7 @@
    1.67  			Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip));
    1.68  			Assert.AreEqual(3, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip));
    1.69  			Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
    1.70 -			Assert.AreEqual(IBBMath.Percentage(3, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.71 +			Assert.AreEqual(25, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.72  		}
    1.73  		
    1.74  		[Test()]
    1.75 @@ -310,7 +310,7 @@
    1.76  			Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip));
    1.77  			Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip));
    1.78  			Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
    1.79 -			Assert.AreEqual(IBBMath.Percentage(1, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.80 +			Assert.AreEqual(10, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.81  		}
    1.82  		
    1.83  		[Test()]
    1.84 @@ -342,7 +342,7 @@
    1.85  			Assert.AreEqual(7, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip));
    1.86  			Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip));
    1.87  			Assert.AreEqual(50, UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
    1.88 -			Assert.AreEqual(IBBMath.Percentage(1, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.89 +			Assert.AreEqual(10, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.90  		}
    1.91  		
    1.92  		[Test()]
    1.93 @@ -359,7 +359,7 @@
    1.94  			Assert.AreEqual(3, UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip));
    1.95  			Assert.AreEqual(1, UnitEquipmentUtil.GetMinEquipmentCount(unit, equip));
    1.96  			Assert.AreEqual(IBBMath.Percentage(3, 15), UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip));
    1.97 -			Assert.AreEqual(IBBMath.Percentage(1, 15), UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.98 +			Assert.AreEqual(10, UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip));
    1.99  		}
   1.100  		
   1.101  		[Test()]