Lines Matching refs:expectedErrorClass
25 private static void checkError(Class<?> expectedErrorClass, Throwable thrown, in checkError() argument
27 if (expectedErrorClass != null && thrown == null) { in checkError()
28 fail("Expected error of type " + expectedErrorClass); in checkError()
29 } else if (expectedErrorClass == null && thrown != null) { in checkError()
31 } else if (expectedErrorClass != null && thrown != null) { in checkError()
38 if (!expectedErrorClass.equals(thrown.getClass())) { in checkError()
40 fail("Expected error of type " + expectedErrorClass + ", but got " + in checkError()
49 public static Class<?> load(String className, Class<?> expectedErrorClass) { in load() argument
52 checkError(expectedErrorClass, null, false); in load()
55 if (expectedErrorClass != null) { in load()
56 checkError(expectedErrorClass, t, false); in load()
70 Class<?> expectedErrorClass, Object... args) { in loadAndRun() argument
97 checkError(expectedErrorClass, null, false); in loadAndRun()
99 checkError(expectedErrorClass, t, wrapped); in loadAndRun()
103 public static void loadAndRun(String className, Class<?> expectedErrorClass) { in loadAndRun() argument
104 loadAndRun(className, false, true, expectedErrorClass); in loadAndRun()
107 public static void loadAndRun(String className, Class<?> expectedErrorClass, Object... args) { in loadAndRun() argument
108 loadAndRun(className, false, true, expectedErrorClass, args); in loadAndRun()