Create tool task that checks Mock fields of test classes

This commit is contained in:
ljacqu
2016-05-21 11:54:54 +02:00
parent 6af65e6cd4
commit 53043ddc0d
7 changed files with 180 additions and 9 deletions
+3 -3
View File
@@ -81,7 +81,7 @@ public final class ToolsRunner {
private static void collectTasksInDirectory(File dir, Map<String, ToolTask> taskCollection) {
File[] files = dir.listFiles();
if (files == null) {
throw new RuntimeException("Cannot read folder '" + dir + "'");
throw new IllegalStateException("Cannot read folder '" + dir + "'");
}
for (File file : files) {
if (file.isDirectory()) {
@@ -112,7 +112,7 @@ public final class ToolsRunner {
return constructor.newInstance();
} catch (NoSuchMethodException | InvocationTargetException |
IllegalAccessException | InstantiationException e) {
throw new RuntimeException("Cannot instantiate task '" + taskClass + "'");
throw new IllegalStateException("Cannot instantiate task '" + taskClass + "'");
}
}
@@ -137,7 +137,7 @@ public final class ToolsRunner {
? (Class<? extends ToolTask>) clazz
: null;
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
throw new IllegalStateException(e);
}
}