diff API/Factories/AbstractNativeWarFoundryFactoryTest.cs @ 168:6dce5122caca

Re #94: Slow file loading * Fix file names and file name references * Add test for file existing so that "doesn't exist" doesn't cause test to pass
author IBBoard <dev@ibboard.co.uk>
date Wed, 07 Sep 2011 20:52:10 +0100
parents 03ccff4d5e8a
children 498396c77601
line wrap: on
line diff
--- a/API/Factories/AbstractNativeWarFoundryFactoryTest.cs	Wed Sep 07 20:38:42 2011 +0100
+++ b/API/Factories/AbstractNativeWarFoundryFactoryTest.cs	Wed Sep 07 20:52:10 2011 +0100
@@ -34,8 +34,10 @@
 		public void Bug358TestLoadingOfFailedFiles()
 		{
 			MockNativeWarFoundryFactory factory = new MockNativeWarFoundryFactory();
-			//This will also be triggered by Bug94TestLoadingTimesForNonZipFiles, but this makes it separate and explicit
-			factory.CreateObjectsFromFile(new FileInfo("testdata/TextFileWithWrongExtension.race"));
+			//This will also be triggered by Bug94TestLoadingTimesForNonZipFiles, but this makes it separate and explicit
+			FileInfo nonRaceFile = new FileInfo("testdata/NotARaceFile.txt");
+			Assert.That(nonRaceFile.Exists, Is.True);
+			Assert.That(factory.CanHandleFileFormat(nonRaceFile), Is.False);
 		}
 	}
 }