diff options
3 files changed, 14 insertions, 3 deletions
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTests.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTests.java index 7f42898fe5..4b8aada524 100644 --- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTests.java +++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTests.java @@ -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 diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTestsBroken.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTestsBroken.java index 897e8dc543..2a0bc8e08d 100644 --- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTestsBroken.java +++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTestsBroken.java @@ -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 diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassTestRunner.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassTestRunner.java index da5210b2da..147362e4c7 100644 --- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassTestRunner.java +++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassTestRunner.java @@ -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. |