Mercurial > repos > IBDev-IBBoard.WarFoundry.API.Tests
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 wrap: on
line diff
--- a/API/Objects/Requirements/UnitRequiresAtLeastNUnitsRequirementTest.cs Sun Mar 27 19:09:02 2011 +0000 +++ b/API/Objects/Requirements/UnitRequiresAtLeastNUnitsRequirementTest.cs Sun Mar 27 19:15:22 2011 +0000 @@ -31,7 +31,7 @@ Army army = new Army(mockRace, "Test", 1000); Unit unit = CreateUnitOfType(unitType1, army); UnitRequiresAtLeastNUnitsRequirement req = new UnitRequiresAtLeastNUnitsRequirement(unitType2); - Assert.That(req.CanAddToArmy(unit, army), Is.False); + Assert.That(req.AllowsAdding(unit, army), Is.False); } [Test()] @@ -41,7 +41,7 @@ AddUnitOfTypeToArmy(unitType2, army); Unit unit = CreateUnitOfType(unitType1, army); UnitRequiresAtLeastNUnitsRequirement req = new UnitRequiresAtLeastNUnitsRequirement(unitType2); - Assert.That(req.CanAddToArmy(unit, army), Is.True); + Assert.That(req.AllowsAdding(unit, army), Is.True); } [Test()] @@ -49,7 +49,7 @@ { Army army = new Army(mockRace, "Test", 1000); UnitRequiresAtLeastNUnitsRequirement req = new UnitRequiresAtLeastNUnitsRequirement(unitType2); - Assert.That(req.CanAddToArmy(unitType1, army), Is.False); + Assert.That(req.AllowsAdding(unitType1, army), Is.False); } [Test()] @@ -58,7 +58,7 @@ Army army = new Army(mockRace, "Test", 1000); AddUnitOfTypeToArmy(unitType2, army); UnitRequiresAtLeastNUnitsRequirement req = new UnitRequiresAtLeastNUnitsRequirement(unitType2); - Assert.That(req.CanAddToArmy(unitType1, army), Is.True); + Assert.That(req.AllowsAdding(unitType1, army), Is.True); } private static void AddUnitOfTypeToArmy(UnitType unitType, Army army)