changeset 166:6b9e86d4be95

Re #358: Handle factory.CreateObjectsFromFile where GetFileAsSupportedType returns null * Add specific unit test
author IBBoard <dev@ibboard.co.uk>
date Tue, 06 Sep 2011 20:35:08 +0100
parents 453640610ef9
children 03ccff4d5e8a
files API/Factories/AbstractNativeWarFoundryFactoryTest.cs
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/API/Factories/AbstractNativeWarFoundryFactoryTest.cs	Tue Sep 06 20:28:17 2011 +0100
+++ b/API/Factories/AbstractNativeWarFoundryFactoryTest.cs	Tue Sep 06 20:35:08 2011 +0100
@@ -29,6 +29,14 @@
 			long timeRatio = failedElapsed / successElapsed;
 			Assert.That(timeRatio, Is.LessThan(10));
 		}
+
+		[Test]
+		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"));
+		}
 	}
 }