Mercurial > repos > IBDev-IBBoard.WarFoundry.API.Tests
comparison API/Factories/Xml/WarFoundryXmlRaceFactoryTest.cs @ 239:370bec16a364 default tip
Add initial testing for equipment with type (incomplete)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 16 Oct 2016 20:29:35 +0100 |
parents | e173c5512067 |
children |
comparison
equal
deleted
inserted
replaced
238:e173c5512067 | 239:370bec16a364 |
---|---|
404 UnitType unitType1 = race.GetUnitType("Empire1"); | 404 UnitType unitType1 = race.GetUnitType("Empire1"); |
405 UnitType unitType3 = race.GetUnitType("Empire3"); | 405 UnitType unitType3 = race.GetUnitType("Empire3"); |
406 Assert.That(race.GetUnitTypes(race.GetCategory("cat1")), Has.Length.EqualTo(2)); | 406 Assert.That(race.GetUnitTypes(race.GetCategory("cat1")), Has.Length.EqualTo(2)); |
407 Assert.That(race.GetUnitTypes(race.GetCategory("cat1")), Has.Member(unitType1)); | 407 Assert.That(race.GetUnitTypes(race.GetCategory("cat1")), Has.Member(unitType1)); |
408 Assert.That(race.GetUnitTypes(race.GetCategory("cat1")), Has.Member(unitType3)); | 408 Assert.That(race.GetUnitTypes(race.GetCategory("cat1")), Has.Member(unitType3)); |
409 } | |
410 | |
411 [Test] | |
412 public void TestEquipmentTypeLoading() | |
413 { | |
414 SetDefaultGameSystem(); | |
415 Race race = SingleXmlObjectLoader.LoadRaceFromXML(WarFoundryXmlFactory.GetFactory(), new FileInfo("testdata/equipment-groups/equipment-with-type.racex")); | |
416 UnitType unitType = race.GetUnitType("Empire1"); | |
417 Assert.That(unitType, Is.Not.Null); | |
418 //TODO: Finish testing | |
409 } | 419 } |
410 | 420 |
411 private void TestFileValidationFailure(string filePath) | 421 private void TestFileValidationFailure(string filePath) |
412 { | 422 { |
413 SetDefaultGameSystem(); | 423 SetDefaultGameSystem(); |