Change-Id: I0642a4a51de5f989811246003415f05688f49f4etags/7.0.2
@@ -32,7 +32,12 @@ public class SassLangTests extends AbstractDirectoryScanningSassTests { | |||
} | |||
private static URL getResourceURLInternal(String path) { | |||
return SassLangTests.class.getResource("/sasslang" + path); | |||
URL url = SassLangTests.class.getResource("/sasslang" + path); | |||
if (url == null) { | |||
throw new RuntimeException( | |||
"Could not locate /sasslang using classloader"); | |||
} | |||
return url; | |||
} | |||
@TestFactory |
@@ -32,7 +32,13 @@ public class SassLangTestsBroken extends AbstractDirectoryScanningSassTests { | |||
} | |||
private static URL getResourceURLInternal(String path) { | |||
return SassLangTestsBroken.class.getResource("/sasslangbroken" + path); | |||
URL url = SassLangTestsBroken.class.getResource("/sasslangbroken" | |||
+ path); | |||
if (url == null) { | |||
throw new RuntimeException( | |||
"Could not locate /sasslangbroken using classloader"); | |||
} | |||
return url; | |||
} | |||
@TestFactory |
@@ -80,7 +80,7 @@ public class SassTestRunner extends BlockJUnit4ClassRunner { | |||
getTestClass().getJavaClass()); | |||
} catch (Throwable t) { | |||
throw new RuntimeException("Could not run test factory method " | |||
+ method.getName()); | |||
+ method.getName(), t); | |||
} | |||
// Did the factory return an array? If so, make it a list. |