Lines Matching refs:expectedErrorClass
23 private static void checkError(Class<?> expectedErrorClass, Throwable thrown, in checkError() argument
25 if (expectedErrorClass != null && thrown == null) { in checkError()
26 fail("Expected error of type " + expectedErrorClass); in checkError()
27 } else if (expectedErrorClass == null && thrown != null) { in checkError()
29 } else if (expectedErrorClass != null && thrown != null) { in checkError()
36 if (!expectedErrorClass.equals(thrown.getClass())) { in checkError()
37 fail("Expected error of type " + expectedErrorClass + ", but got " + in checkError()
46 public static Class<?> load(String className, Class<?> expectedErrorClass) { in load() argument
49 checkError(expectedErrorClass, null, false); in load()
52 if (expectedErrorClass != null) { in load()
53 checkError(expectedErrorClass, t, false); in load()
66 Class<?> expectedErrorClass, Object... args) { in loadAndRun() argument
93 checkError(expectedErrorClass, null, false); in loadAndRun()
95 checkError(expectedErrorClass, t, wrapped); in loadAndRun()
99 public static void loadAndRun(String className, Class<?> expectedErrorClass) { in loadAndRun() argument
100 loadAndRun(className, false, true, expectedErrorClass); in loadAndRun()
103 public static void loadAndRun(String className, Class<?> expectedErrorClass, Object... args) { in loadAndRun() argument
104 loadAndRun(className, false, true, expectedErrorClass, args); in loadAndRun()