diff API/Objects/RaceTests.cs @ 238:e173c5512067

* Update to v2.6 of NUnit and new syntax/API changes
author IBBoard <dev@ibboard.co.uk>
date Sun, 28 Apr 2013 19:32:38 +0100
parents 49480e1a8f90
children
line wrap: on
line diff
--- a/API/Objects/RaceTests.cs	Tue Nov 06 20:58:48 2012 +0000
+++ b/API/Objects/RaceTests.cs	Sun Apr 28 19:32:38 2013 +0100
@@ -4,7 +4,6 @@
 using System;
 using NUnit.Framework;
 using IBBoard.WarFoundry.API.Objects.Mock;
-using NUnit.Framework.SyntaxHelpers;
 using IBBoard.WarFoundry.API.Objects.Requirement;
 using System.Collections.Generic;
 using IBBoard.NUnit;
@@ -19,7 +18,7 @@
 		[Test()]
 		public void TestRaceWithNoUnitTypesHasNoRequirements()
 		{
-			Assert.That(new MockRace().GetRequirements(), Has.Count(0));
+			Assert.That(new MockRace().GetRequirements(), Has.Count.EqualTo(0));
 		}
 
 		[Test()]
@@ -27,7 +26,7 @@
 		{
 			MockRace race = new MockRace();
 			race.AddUnitType(new MockUnitType());
-			Assert.That(race.GetRequirements(), Has.Count(0));
+			Assert.That(race.GetRequirements(), Has.Count.EqualTo(0));
 		}
 
 		[Test()]
@@ -39,7 +38,7 @@
 			unitType.AddRequirement(unitRequirement);
 			race.AddUnitType(unitType);
 			ICollection<IRequirement> raceRequirements = race.GetRequirements();
-			Assert.That(raceRequirements, Has.Count(1));
+			Assert.That(raceRequirements, Has.Count.EqualTo(1));
 			Assert.That(raceRequirements, Has.All.EqualTo(unitRequirement));
 		}
 
@@ -58,7 +57,7 @@
 			unitType2.AddRequirement(unitRequirement3);
 			race.AddUnitType(unitType2);
 			ICollection<IRequirement> raceRequirements = race.GetRequirements();
-			Assert.That(raceRequirements, Has.Count(3));
+			Assert.That(raceRequirements, Has.Count.EqualTo(3));
 			Assert.That(raceRequirements, Has.Member(unitRequirement1));
 			Assert.That(raceRequirements, Has.Member(unitRequirement2));
 			Assert.That(raceRequirements, Has.Member(unitRequirement3));
@@ -73,7 +72,7 @@
 			MockContainedUnitType unitType2 = new MockContainedUnitType("type2", "Type 2");
 			race.AddUnitType(unitType2);
 			unitType1.AddContainedUnitType(unitType2);
-			Assert.That(race.GetUnitTypes(MockCategory.GetCategory()), Has.Length(1));
+			Assert.That(race.GetUnitTypes(MockCategory.GetCategory()), Has.Length.EqualTo(1));
 			Assert.That(race.GetUnitTypes(MockCategory.GetCategory()), Has.Member(unitType1));
 		}