Mercurial > repos > IBDev-IBBoard.WarFoundry.API.Tests
diff API/Factories/Xml/WarFoundryXmlFactoryUtilTest.cs @ 42:d4f6e9ac981e
Re #152: Test and fix extensibility of current schemas
* Test system and army files
* Test multiple unknown children in racex file
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 13 Mar 2010 20:50:31 +0000 |
parents | feb77f3287ca |
children | b2517bb113d0 |
line wrap: on
line diff
--- a/API/Factories/Xml/WarFoundryXmlFactoryUtilTest.cs Sat Mar 13 16:47:03 2010 +0000 +++ b/API/Factories/Xml/WarFoundryXmlFactoryUtilTest.cs Sat Mar 13 20:50:31 2010 +0000 @@ -4,6 +4,7 @@ using System; using System.IO; +using System.Xml; using NUnit.Framework; namespace IBBoard.WarFoundry.API.Factories.Xml @@ -12,9 +13,17 @@ public class WarFoundryXmlFactoryUtilTest { [Test()] - public void TestParsingExtendedDataFile() + public void TestParsingExtendedDataFiles() { - WarFoundryXmlFactoryUtils.CreateXmlDocumentFromStream(new FileInfo("testdata/extended-data.racex").OpenRead()); + TestParsingExtendedDataFile("testdata/extended-data.racex"); + TestParsingExtendedDataFile("testdata/extended-data.systemx"); + TestParsingExtendedDataFile("testdata/extended-data.armyx"); + } + + private static void TestParsingExtendedDataFile(string path) + { + XmlDocument document = WarFoundryXmlFactoryUtils.CreateXmlDocumentFromStream(new FileInfo(path).OpenRead()); + Assert.IsNotNull(document); } } }