# HG changeset patch # User IBBoard # Date 1268513431 0 # Node ID d4f6e9ac981ef097a61beb0a517e02aefd810d1a # Parent 9980a76e6a5eac063208d4f5c08c630e3b2ea0ba Re #152: Test and fix extensibility of current schemas * Test system and army files * Test multiple unknown children in racex file diff -r 9980a76e6a5e -r d4f6e9ac981e API/Factories/Xml/WarFoundryXmlFactoryUtilTest.cs --- 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); } } } diff -r 9980a76e6a5e -r d4f6e9ac981e IBBoard.WarFoundry.API.Tests.csproj --- a/IBBoard.WarFoundry.API.Tests.csproj Sat Mar 13 16:47:03 2010 +0000 +++ b/IBBoard.WarFoundry.API.Tests.csproj Sat Mar 13 20:50:31 2010 +0000 @@ -81,6 +81,12 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + diff -r 9980a76e6a5e -r d4f6e9ac981e testdata/extended-data.armyx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testdata/extended-data.armyx Sat Mar 13 20:50:31 2010 +0000 @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 9980a76e6a5e -r d4f6e9ac981e testdata/extended-data.racex --- a/testdata/extended-data.racex Sat Mar 13 16:47:03 2010 +0000 +++ b/testdata/extended-data.racex Sat Mar 13 20:50:31 2010 +0000 @@ -3,6 +3,7 @@ + @@ -15,17 +16,23 @@ + + - + + + + + @@ -37,6 +44,7 @@ + @@ -49,13 +57,16 @@ + + + \ No newline at end of file diff -r 9980a76e6a5e -r d4f6e9ac981e testdata/extended-data.systemx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testdata/extended-data.systemx Sat Mar 13 20:50:31 2010 +0000 @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + +