changeset 108:74bfe8b325d6

Re #27: Define unit requirements * Add tests where a min count > 1 is set
author IBBoard <dev@ibboard.co.uk>
date Sun, 27 Mar 2011 19:49:51 +0000
parents e2ea6562ef08
children f5f66483032a
files API/Objects/Requirement/RequiresAtLeastNUnitsRequirementTest.cs
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/API/Objects/Requirement/RequiresAtLeastNUnitsRequirementTest.cs	Sun Mar 27 19:36:31 2011 +0000
+++ b/API/Objects/Requirement/RequiresAtLeastNUnitsRequirementTest.cs	Sun Mar 27 19:49:51 2011 +0000
@@ -92,7 +92,7 @@
 		}
 
 		[Test()]
-		public void TestAddingUnitTypeWithOneUnitsAndTwoOfOneUnitTypeRequired()
+		public void TestAddingUnitTypeWithOneUnitAndTwoOfOneUnitTypeRequired()
 		{
 			Army army = new Army(mockRace, "Test", 1000);
 			AddUnitOfTypeToArmy(unitType2, army);
@@ -102,11 +102,13 @@
 		}
 
 		[Test()]
-		public void TestAddingUnitTypeWithOneUnitAndOneUnitTypeRequired()
+		public void TestAddingUnitTypeWithTwoUnitAndTwoOfOneUnitTypeRequired()
 		{
 			Army army = new Army(mockRace, "Test", 1000);
 			AddUnitOfTypeToArmy(unitType2, army);
-			RequiresAtLeastNUnitsRequirement req = new RequiresAtLeastNUnitsRequirement(unitType2);
+			AddUnitOfTypeToArmy(unitType2, army);
+			RequiresAtLeastNUnitsRequirement req = new RequiresAtLeastNUnitsRequirement();
+			req.AddUnitTypeRequirement(unitType2, 2);
 			Assert.That(req.AllowsAdding(unitType1, army), Is.True);
 		}