changeset 204:ea104de9189e

Re #379: Fix validation of requirements to check for unit * Add tests for new method in Army to get just adding-relevant requirements
author IBBoard <dev@ibboard.co.uk>
date Sat, 28 Jan 2012 16:58:42 +0000
parents 2b27447ae74e
children d39682a98adf
files API/Factories/Xml/WarFoundryXmlRaceFactoryTest.cs IBBoard.WarFoundry.API.Tests.csproj
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/API/Factories/Xml/WarFoundryXmlRaceFactoryTest.cs	Sat Jan 21 21:01:02 2012 +0000
+++ b/API/Factories/Xml/WarFoundryXmlRaceFactoryTest.cs	Sat Jan 28 16:58:42 2012 +0000
@@ -381,7 +381,7 @@
 			SetDefaultGameSystem();
 			Race race = SingleXmlObjectLoader.LoadRaceFromXML(WarFoundryXmlFactory.GetFactory(), new FileInfo("testdata/xml-race-factory/cyclic.racex"));
 			UnitType unitType = race.GetUnitType("Empire1");
-			Assert.That(unitType.GetRequirements()[0], Is.InstanceOfType(typeof(UnitRequiresAtLeastNUnitsRequirement)));
+			Assert.That(unitType.GetRequirements()[0], Is.InstanceOfType(typeof(UnitRequiresNoMoreThanNOfUnitTypeRequirement)));
 		}
 
 		private void TestFileValidationFailure(string filePath)
--- a/IBBoard.WarFoundry.API.Tests.csproj	Sat Jan 21 21:01:02 2012 +0000
+++ b/IBBoard.WarFoundry.API.Tests.csproj	Sat Jan 28 16:58:42 2012 +0000
@@ -116,6 +116,7 @@
     <Compile Include="API\Objects\Requirement\RequiresNUnitsForMUnitsRequirementTest.cs" />
     <Compile Include="API\Factories\Requirement\UnitRequiresNUnitsForMUnitsRequirementFactoryTest.cs" />
     <Compile Include="API\Factories\Mock\FileSearchingWarFoundryFactory.cs" />
+    <Compile Include="API\Objects\ArmyTests.cs" />
   </ItemGroup>
   <ItemGroup>
     <None Include="app.config" />