comparison 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
comparison
equal deleted inserted replaced
41:9980a76e6a5e 42:d4f6e9ac981e
2 // 2 //
3 // // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. 3 // // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
4 4
5 using System; 5 using System;
6 using System.IO; 6 using System.IO;
7 using System.Xml;
7 using NUnit.Framework; 8 using NUnit.Framework;
8 9
9 namespace IBBoard.WarFoundry.API.Factories.Xml 10 namespace IBBoard.WarFoundry.API.Factories.Xml
10 { 11 {
11 [TestFixture()] 12 [TestFixture()]
12 public class WarFoundryXmlFactoryUtilTest 13 public class WarFoundryXmlFactoryUtilTest
13 { 14 {
14 [Test()] 15 [Test()]
15 public void TestParsingExtendedDataFile() 16 public void TestParsingExtendedDataFiles()
16 { 17 {
17 WarFoundryXmlFactoryUtils.CreateXmlDocumentFromStream(new FileInfo("testdata/extended-data.racex").OpenRead()); 18 TestParsingExtendedDataFile("testdata/extended-data.racex");
19 TestParsingExtendedDataFile("testdata/extended-data.systemx");
20 TestParsingExtendedDataFile("testdata/extended-data.armyx");
21 }
22
23 private static void TestParsingExtendedDataFile(string path)
24 {
25 XmlDocument document = WarFoundryXmlFactoryUtils.CreateXmlDocumentFromStream(new FileInfo(path).OpenRead());
26 Assert.IsNotNull(document);
18 } 27 }
19 } 28 }
20 } 29 }