Mercurial > repos > IBDev-IBBoard.WarFoundry.API.Tests
diff API/Factories/Xml/WarFoundryXmlSystemFactoryTest.cs @ 70:90a9f13b9627
Fixes #290: Migrate to using key/keyref definitions instead of ID/IDREF type
* Add test for duplicate stats set IDs
That seems to be all of them!
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 05 Jul 2010 19:49:24 +0000 |
parents | a82f164e26e3 |
children | a2095a3685fc |
line wrap: on
line diff
--- a/API/Factories/Xml/WarFoundryXmlSystemFactoryTest.cs Sun Jul 04 20:04:16 2010 +0000 +++ b/API/Factories/Xml/WarFoundryXmlSystemFactoryTest.cs Mon Jul 05 19:49:24 2010 +0000 @@ -19,7 +19,9 @@ { GameSystem system = SingleXmlObjectLoader.LoadGameSystemFromXML(WarFoundryXmlFactory.GetFactory(), new FileInfo("testdata/xml-system-factory/valid-default-stats-one-stats-set.systemx")); Assert.That(system.IsFullyLoaded, Is.False); - string temp = system.StandardSystemStatsID; + string defaultStatsID = system.StandardSystemStatsID; + Assert.That(defaultStatsID, Is.Not.Null); + Assert.That(defaultStatsID, Is.Not.Empty); Assert.That(system.IsFullyLoaded, Is.True); } @@ -45,6 +47,13 @@ TestFileValidationFailure("testdata/xml-system-factory/invalid-default-stats.systemx"); } + [Test()] + public void TestDuplicateStatsIDErrors() + { + TestFileValidationFailure("testdata/xml-system-factory/duplicate-stats-set-id.systemx"); + } + + private void TestFileValidationFailure(string filePath) { FileInfo systemFile = new FileInfo(filePath);