diff API/Factories/Requirement/UnitRequiresAtLeastNUnitsRequirementFactoryTest.cs @ 157:17c5030485dc

Re #351: Add extensible requirement handling method * Swap to using IRequirement, as per interface * Test registration of factories
author IBBoard <dev@ibboard.co.uk>
date Sat, 23 Jul 2011 19:54:37 +0000
parents 3725fd449c77
children c40cb2048fc3
line wrap: on
line diff
--- a/API/Factories/Requirement/UnitRequiresAtLeastNUnitsRequirementFactoryTest.cs	Sat Jul 16 19:59:33 2011 +0000
+++ b/API/Factories/Requirement/UnitRequiresAtLeastNUnitsRequirementFactoryTest.cs	Sat Jul 23 19:54:37 2011 +0000
@@ -45,7 +45,7 @@
 			UnitType unitType = new UnitType("testUnit", "Test Unit", race);
 			UnitRequiresAtLeastNUnitsRequirement expectedReq = new UnitRequiresAtLeastNUnitsRequirement(unitType);
 			expectedReq.AddUnitTypeRequirement(unitType1);
-			UnitRequiresAtLeastNUnitsRequirement req = factory.CreateRequirement(unitType, typeID1, raceFactory);
+			IRequirement req = factory.CreateRequirement(unitType, typeID1, raceFactory);
 			Assert.That(req, Is.EqualTo(expectedReq));
 		}
 
@@ -57,7 +57,7 @@
 			UnitRequiresAtLeastNUnitsRequirement expectedReq = new UnitRequiresAtLeastNUnitsRequirement(unitType);
 			expectedReq.AddUnitTypeRequirement(unitType1);
 			expectedReq.AddUnitTypeRequirement(unitType2);
-			UnitRequiresAtLeastNUnitsRequirement req = factory.CreateRequirement(unitType, typeID1 + "|" + typeID2, raceFactory);
+			IRequirement req = factory.CreateRequirement(unitType, typeID1 + "|" + typeID2, raceFactory);
 			Assert.That(req, Is.EqualTo(expectedReq));
 		}
 
@@ -68,7 +68,7 @@
 			UnitType unitType = new UnitType("testUnit", "Test Unit", race);
 			UnitRequiresAtLeastNUnitsRequirement expectedReq = new UnitRequiresAtLeastNUnitsRequirement(unitType);
 			expectedReq.AddUnitTypeRequirement(unitType1, 2);
-			UnitRequiresAtLeastNUnitsRequirement req = factory.CreateRequirement(unitType, typeID1 + ":2", raceFactory);
+			IRequirement req = factory.CreateRequirement(unitType, typeID1 + ":2", raceFactory);
 			Assert.That(req, Is.EqualTo(expectedReq));
 		}
 
@@ -80,7 +80,7 @@
 			UnitRequiresAtLeastNUnitsRequirement expectedReq = new UnitRequiresAtLeastNUnitsRequirement(unitType);
 			expectedReq.AddUnitTypeRequirement(unitType1, 2);
 			expectedReq.AddUnitTypeRequirement(unitType2, 3);
-			UnitRequiresAtLeastNUnitsRequirement req = factory.CreateRequirement(unitType, typeID1 + ":2|" + typeID2 + ":3", raceFactory);
+			IRequirement req = factory.CreateRequirement(unitType, typeID1 + ":2|" + typeID2 + ":3", raceFactory);
 			Assert.That(req, Is.EqualTo(expectedReq));
 		}
 
@@ -92,7 +92,7 @@
 			UnitRequiresAtLeastNUnitsRequirement expectedReq = new UnitRequiresAtLeastNUnitsRequirement(unitType);
 			expectedReq.AddUnitTypeRequirement(unitType1, 2);
 			expectedReq.AddUnitTypeRequirement(unitType2);
-			UnitRequiresAtLeastNUnitsRequirement req = factory.CreateRequirement(unitType, typeID1 + ":2|" + typeID2, raceFactory);
+			IRequirement req = factory.CreateRequirement(unitType, typeID1 + ":2|" + typeID2, raceFactory);
 			Assert.That(req, Is.EqualTo(expectedReq));
 		}
 
@@ -104,7 +104,7 @@
 			UnitRequiresAtLeastNUnitsRequirement expectedReq = new UnitRequiresAtLeastNUnitsRequirement(unitType);
 			expectedReq.AddUnitTypeRequirement(unitType1);
 			expectedReq.AddUnitTypeRequirement(unitType2, 3);
-			UnitRequiresAtLeastNUnitsRequirement req = factory.CreateRequirement(unitType, typeID1 + "|" + typeID2 + ":3", raceFactory);
+			IRequirement req = factory.CreateRequirement(unitType, typeID1 + "|" + typeID2 + ":3", raceFactory);
 			Assert.That(req, Is.EqualTo(expectedReq));
 		}