diff options
author | Artur Signell <artur@vaadin.com> | 2013-02-28 02:02:37 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-02-28 09:46:38 +0200 |
commit | 4b955715413720fac82d287e42d27f2c118a88fc (patch) | |
tree | 9f5a0d2145ec2588c25df5a0cd0da7b2b347ad64 | |
parent | a3767aaee3da57cbbdae74159ac38677bbc4111d (diff) | |
download | vaadin-framework-4b955715413720fac82d287e42d27f2c118a88fc.tar.gz vaadin-framework-4b955715413720fac82d287e42d27f2c118a88fc.zip |
Print an error message if the test folder cannot be found (#11184)
Change-Id: I0642a4a51de5f989811246003415f05688f49f4e
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. |