changeset 191:2b19d6f18f3a

Re #350: Add requirement to allow N of unit for specific other units * Correct expected output in tests - we haven't added when we check if adding is okay
author IBBoard <dev@ibboard.co.uk>
date Sat, 03 Dec 2011 16:13:38 +0000
parents 702a0957f9e4
children f25cb069f700
files API/Objects/Requirement/RequiresNUnitsForMUnitsRequirementTest.cs
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/API/Objects/Requirement/RequiresNUnitsForMUnitsRequirementTest.cs	Wed Nov 30 21:05:54 2011 +0000
+++ b/API/Objects/Requirement/RequiresNUnitsForMUnitsRequirementTest.cs	Sat Dec 03 16:13:38 2011 +0000
@@ -59,7 +59,7 @@
 			RequiresNUnitsForMUnitsRequirement req = new RequiresNUnitsForMUnitsRequirement(unitType1, unitType2);
 			Unit unit = CreateUnitOfType(unitType1, army);
 			Assert.That(req.AllowsAdding(unit, army), Is.EqualTo(Validation.Failed));
-			Assert.That(req.GetAllowsAddingMessage(unit.UnitType, army), Is.EqualTo("Army must contain: 1 "+unitType2.Name+" for every 1 "+unitType1.Name + " (have 0 for 1)."));
+			Assert.That(req.GetAllowsAddingMessage(unit.UnitType, army), Is.EqualTo("Army must contain: 1 "+unitType2.Name+" for every 1 "+unitType1.Name + " (would have 0 for 1)."));
 		}
 
 		[Test()]
@@ -71,7 +71,7 @@
 			RequiresNUnitsForMUnitsRequirement req = new RequiresNUnitsForMUnitsRequirement(unitType1, unitType2);
 			Unit unit = CreateUnitOfType(unitType1, army);
 			Assert.That(req.AllowsAdding(unit, army), Is.EqualTo(Validation.Failed));
-			Assert.That(req.GetAllowsAddingMessage(unit.UnitType, army), Is.EqualTo("Army must contain: 1 " + unitType2.Name + " for every 1 " + unitType1.Name + " (have 1 for 2)."));
+			Assert.That(req.GetAllowsAddingMessage(unit.UnitType, army), Is.EqualTo("Army must contain: 1 " + unitType2.Name + " for every 1 " + unitType1.Name + " (would have 1 for 2)."));
 		}
 
 		[Test()]
@@ -98,7 +98,7 @@
 			req.AddUnitTypeRequirement(unitType2, 1, 2);
 			Unit unit = CreateUnitOfType(unitType1, army);
 			Assert.That(req.AllowsAdding(unit, army), Is.EqualTo(Validation.Failed));
-			Assert.That(req.GetAllowsAddingMessage(unit.UnitType, army), Is.EqualTo("Army must contain: 1 " + unitType2.Name + " for every 2 " + unitType1.Name + " (have 1 for 3)."));
+			Assert.That(req.GetAllowsAddingMessage(unit.UnitType, army), Is.EqualTo("Army must contain: 1 " + unitType2.Name + " for every 2 " + unitType1.Name + " (would have 1 for 3)."));
 		}
 
 		[Test()]