changeset 3:40b31dfd6a46

Update tests (one currently fails because of "end of stream" that doesn't occur when using factories normally) no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Sun, 25 Jan 2009 13:54:18 +0000
parents e1f8cb533bfa
children 4222cfa99c78
files IBBoard.WarFoundry.API.Tests.mdp MockObjects/MockFactory.cs MockObjects/MockRaceZipFile.cs MockObjects/MockSystemZipFile.cs WarFoundryLoaderTest.cs test-results/IBBoard.WarFoundry.API.Tests.mdp.test-cache testdata/Race.zip testdata/System.zip testdata/Test.race testdata/Test.system
diffstat 10 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/IBBoard.WarFoundry.API.Tests.mdp	Fri Dec 19 16:44:56 2008 +0000
+++ b/IBBoard.WarFoundry.API.Tests.mdp	Sun Jan 25 13:54:18 2009 +0000
@@ -24,8 +24,8 @@
     <File name="MockObjects/FixedFileWarFoundryLoader.cs" subtype="Code" buildaction="Compile" />
     <File name="MockObjects/MockRaceZipFile.cs" subtype="Code" buildaction="Compile" />
     <File name="testdata" subtype="Directory" buildaction="Compile" />
-    <File name="testdata/Race.zip" subtype="Code" buildaction="Nothing" />
-    <File name="testdata/System.zip" subtype="Code" buildaction="Nothing" />
+    <File name="testdata/Test.race" subtype="Code" buildaction="Nothing" copyToOutputDirectory="PreserveNewest" />
+    <File name="testdata/Test.system" subtype="Code" buildaction="Nothing" copyToOutputDirectory="PreserveNewest" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="nunit.framework, Version=2.2.9.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
@@ -33,4 +33,5 @@
     <ProjectReference type="Assembly" localcopy="True" refto="libs/ICSharpCode.SharpZipLib.dll" />
   </References>
   <Deployment.LinuxDeployData generateScript="False" />
+  <GtkDesignInfo />
 </Project>
\ No newline at end of file
--- a/MockObjects/MockFactory.cs	Fri Dec 19 16:44:56 2008 +0000
+++ b/MockObjects/MockFactory.cs	Sun Jan 25 13:54:18 2009 +0000
@@ -44,11 +44,6 @@
 		{
 			return true;
 		}
-
-		public override void CompleteLoading (IWarFoundryStagedLoadObject obj)
-		{
-			//Do nothing
-		}
 		
 		protected override Army CreateArmyFromStream (ZipFile file, Stream dataStream)
 		{
--- a/MockObjects/MockRaceZipFile.cs	Fri Dec 19 16:44:56 2008 +0000
+++ b/MockObjects/MockRaceZipFile.cs	Sun Jan 25 13:54:18 2009 +0000
@@ -19,13 +19,14 @@
 //
 
 using System;
+using System.IO;
 using ICSharpCode.SharpZipLib.Zip;
 
 namespace IBBoard.WarFoundry.API
 {	
 	public class MockRaceZipFile : ZipFile
 	{		
-		public MockRaceZipFile() : base("../../testdata/Race.zip")
+		public MockRaceZipFile() : base(new FileInfo("Test.race").OpenRead())
 		{
 		}
 	}
--- a/MockObjects/MockSystemZipFile.cs	Fri Dec 19 16:44:56 2008 +0000
+++ b/MockObjects/MockSystemZipFile.cs	Sun Jan 25 13:54:18 2009 +0000
@@ -18,13 +18,14 @@
 //
 
 using System;
+using System.IO;
 using ICSharpCode.SharpZipLib.Zip;
 
 namespace IBBoard.WarFoundry.API
 {
 	public class MockSystemZipFile : ZipFile
 	{
-		public MockSystemZipFile() : base("../../testdata/System.zip")
+		public MockSystemZipFile() : base(new FileInfo("Test.system").OpenRead())
 		{
 		}
 	}
--- a/WarFoundryLoaderTest.cs	Fri Dec 19 16:44:56 2008 +0000
+++ b/WarFoundryLoaderTest.cs	Sun Jan 25 13:54:18 2009 +0000
@@ -40,7 +40,7 @@
 		public void TestLoadingSystemCompletesWithoutError()
 		{
 			WarFoundryLoader loader = GetSystemLoader();
-			DirectoryInfo dir = new DirectoryInfo("/");
+			DirectoryInfo dir = new DirectoryInfo(".");
 			loader.RegisterFactory(GetFactory());
 			loader.AddLoadDirectory(dir);
 			loader.LoadFiles();
Binary file test-results/IBBoard.WarFoundry.API.Tests.mdp.test-cache has changed
Binary file testdata/Race.zip has changed
Binary file testdata/System.zip has changed
Binary file testdata/Test.race has changed
Binary file testdata/Test.system has changed