comparison 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
comparison
equal deleted inserted replaced
167:03ccff4d5e8a 168:6dce5122caca
33 [Test] 33 [Test]
34 public void Bug358TestLoadingOfFailedFiles() 34 public void Bug358TestLoadingOfFailedFiles()
35 { 35 {
36 MockNativeWarFoundryFactory factory = new MockNativeWarFoundryFactory(); 36 MockNativeWarFoundryFactory factory = new MockNativeWarFoundryFactory();
37 //This will also be triggered by Bug94TestLoadingTimesForNonZipFiles, but this makes it separate and explicit 37 //This will also be triggered by Bug94TestLoadingTimesForNonZipFiles, but this makes it separate and explicit
38 factory.CreateObjectsFromFile(new FileInfo("testdata/TextFileWithWrongExtension.race")); 38 FileInfo nonRaceFile = new FileInfo("testdata/NotARaceFile.txt");
39 Assert.That(nonRaceFile.Exists, Is.True);
40 Assert.That(factory.CanHandleFileFormat(nonRaceFile), Is.False);
39 } 41 }
40 } 42 }
41 } 43 }
42 44