# HG changeset patch # User IBBoard # Date 1315337708 -3600 # Node ID 6b9e86d4be953cf5ece832437c4df7e15047e1a1 # Parent 453640610ef9bba94852c514d56ad5410a44dbf1 Re #358: Handle factory.CreateObjectsFromFile where GetFileAsSupportedType returns null * Add specific unit test diff -r 453640610ef9 -r 6b9e86d4be95 API/Factories/AbstractNativeWarFoundryFactoryTest.cs --- 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")); + } } }