changeset 105:9163bd04a3db

Re #27: Define unit requirements * Update method name for a more "natural language" approach of "if (req.AllowsAdding(...))"
author IBBoard <dev@ibboard.co.uk>
date Sun, 27 Mar 2011 19:15:22 +0000
parents 782494137b58
children 4dad874f4862
files API/Objects/Requirements/UnitRequiresAtLeastNUnitsRequirementTest.cs
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- a/API/Objects/Requirements/UnitRequiresAtLeastNUnitsRequirementTest.cs	Sun Mar 27 19:09:02 2011 +0000
     1.2 +++ b/API/Objects/Requirements/UnitRequiresAtLeastNUnitsRequirementTest.cs	Sun Mar 27 19:15:22 2011 +0000
     1.3 @@ -31,7 +31,7 @@
     1.4  			Army army = new Army(mockRace, "Test", 1000);
     1.5  			Unit unit = CreateUnitOfType(unitType1, army);
     1.6  			UnitRequiresAtLeastNUnitsRequirement req = new UnitRequiresAtLeastNUnitsRequirement(unitType2);
     1.7 -			Assert.That(req.CanAddToArmy(unit, army), Is.False);
     1.8 +			Assert.That(req.AllowsAdding(unit, army), Is.False);
     1.9  		}
    1.10  
    1.11  		[Test()]
    1.12 @@ -41,7 +41,7 @@
    1.13  			AddUnitOfTypeToArmy(unitType2, army);
    1.14  			Unit unit = CreateUnitOfType(unitType1, army);
    1.15  			UnitRequiresAtLeastNUnitsRequirement req = new UnitRequiresAtLeastNUnitsRequirement(unitType2);
    1.16 -			Assert.That(req.CanAddToArmy(unit, army), Is.True);
    1.17 +			Assert.That(req.AllowsAdding(unit, army), Is.True);
    1.18  		}
    1.19  
    1.20  		[Test()]
    1.21 @@ -49,7 +49,7 @@
    1.22  		{
    1.23  			Army army = new Army(mockRace, "Test", 1000);
    1.24  			UnitRequiresAtLeastNUnitsRequirement req = new UnitRequiresAtLeastNUnitsRequirement(unitType2);
    1.25 -			Assert.That(req.CanAddToArmy(unitType1, army), Is.False);
    1.26 +			Assert.That(req.AllowsAdding(unitType1, army), Is.False);
    1.27  		}
    1.28  
    1.29  		[Test()]
    1.30 @@ -58,7 +58,7 @@
    1.31  			Army army = new Army(mockRace, "Test", 1000);
    1.32  			AddUnitOfTypeToArmy(unitType2, army);
    1.33  			UnitRequiresAtLeastNUnitsRequirement req = new UnitRequiresAtLeastNUnitsRequirement(unitType2);
    1.34 -			Assert.That(req.CanAddToArmy(unitType1, army), Is.True);
    1.35 +			Assert.That(req.AllowsAdding(unitType1, army), Is.True);
    1.36  		}
    1.37  
    1.38  		private static void AddUnitOfTypeToArmy(UnitType unitType, Army army)