Mercurial > repos > IBDev-IBBoard.WarFoundry.API.Tests
comparison API/Factories/Xml/WarFoundryXmlSystemFactoryTest.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 |
---|---|
93 Assert.That(system.SystemPtsAbbrevSingle, Is.EqualTo("pt")); | 93 Assert.That(system.SystemPtsAbbrevSingle, Is.EqualTo("pt")); |
94 Assert.That(system.SystemPtsNamePlural, Is.EqualTo("points")); | 94 Assert.That(system.SystemPtsNamePlural, Is.EqualTo("points")); |
95 Assert.That(system.SystemPtsNameSingle, Is.EqualTo("point")); | 95 Assert.That(system.SystemPtsNameSingle, Is.EqualTo("point")); |
96 } | 96 } |
97 | 97 |
98 [Test] | |
99 public void TestLoadingEquipmentCategories() | |
100 { | |
101 GameSystem system = SingleXmlObjectLoader.LoadGameSystemFromXML(WarFoundryXmlFactory.GetFactory(), new FileInfo("testdata/default.systemx")); | |
102 Assert.That(system.EquipmentCategories, Is.EquivalentTo(new EquipmentCategory[]{new EquipmentCategory("equip1", "Weapons"), new EquipmentCategory("equip2", "Armour")})); | |
103 } | |
104 | |
98 private void TestFileValidationFailure(string filePath) | 105 private void TestFileValidationFailure(string filePath) |
99 { | 106 { |
100 FileInfo systemFile = new FileInfo(filePath); | 107 FileInfo systemFile = new FileInfo(filePath); |
101 | 108 |
102 try | 109 try |