@Override public Runner runnerForClass(Class<?> testClass) throws Exception { RunWith annotation = testClass.getAnnotation(RunWith.class); if (annotation != null) { return buildRunner(annotation.value(), testClass); } return null; }
@Override public Runner runnerForClass(Class<?> testClass) throws Exception { for (Class<?> currentTestClass = testClass; currentTestClass != null; currentTestClass = getEnclosingClassForNonStaticMemberClass(currentTestClass)) { RunWith annotation = currentTestClass.getAnnotation(RunWith.class); if (annotation != null) { return buildRunner(annotation.value(), testClass); } } return null; }
@Override public Runner buildRunner(Class<? extends Runner> runnerClass, Class<?> testClass) throws Exception { // Referenced by name because it might not be available at runtime. if ("org.junit.platform.runner.JUnitPlatform".equals(runnerClass.getName())) { logger.warn(() -> "Ignoring test class using JUnitPlatform runner: " + testClass.getName()); return null; } return super.buildRunner(runnerClass, testClass); } }
@Override public Runner runnerForClass(Class<?> testClass) throws Exception { RunWith annotation = testClass.getAnnotation(RunWith.class); if (annotation != null) { return buildRunner(annotation.value(), testClass); } return null; }
.buildRunner(getAnnotationAttributeFrom(isolatedTestClass, runnerDelegateToClass, "value"), isolatedTestClass); } finally { currentThread().setContextClassLoader(contextClassLoader);
@Override public Runner buildRunner(Class<? extends Runner> runnerClass, Class<?> testClass) throws Exception { // Referenced by name because it might not be available at runtime. if ("org.junit.gen5.junit4.runner.JUnit5".equals(runnerClass.getName())) { return null; } return super.buildRunner(runnerClass, testClass); } }
@Override public Runner buildRunner(Class<? extends Runner> runnerClass, Class<?> testClass) throws Exception { if (XtextRunner.class.equals(runnerClass)) { return new AllScenariosRunner(testClass, processor, scenarios); } return super.buildRunner(runnerClass, testClass); } };
@Override public Runner runnerForClass(Class<?> testClass) throws Exception { RunWith annotation = testClass.getAnnotation(RunWith.class); if (annotation != null) { return buildRunner(annotation.value(), testClass); } return null; }
@Override public Runner runnerForClass(Class<?> testClass) throws Exception { RunWith annotation = testClass.getAnnotation(RunWith.class); if (annotation != null) { return buildRunner(annotation.value(), testClass); } return null; }
@Override public Runner runnerForClass(Class<?> testClass) throws Exception { for (Class<?> currentTestClass = testClass; currentTestClass != null; currentTestClass = getEnclosingClassForNonStaticMemberClass(currentTestClass)) { RunWith annotation = currentTestClass.getAnnotation(RunWith.class); if (annotation != null) { return buildRunner(annotation.value(), testClass); } } return null; }
@Override public Runner runnerForClass(Class<?> testClass) throws Exception { for (Class<?> currentTestClass = testClass; currentTestClass != null; currentTestClass = getEnclosingClassForNonStaticMemberClass(currentTestClass)) { RunWith annotation = currentTestClass.getAnnotation(RunWith.class); if (annotation != null) { return buildRunner(annotation.value(), testClass); } } return null; }
.buildRunner(getAnnotationAttributeFrom(isolatedTestClass, runnerDelegateToClass, "value"), isolatedTestClass); } finally { currentThread().setContextClassLoader(contextClassLoader);