@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; }
private boolean shouldRun(Fingerprint fingerprint, Class<?> clazz, RunSettings settings) { if(JUNIT_FP.equals(fingerprint)) { // Ignore classes which are matched by the other fingerprints if(TestCase.class.isAssignableFrom(clazz)) return false; for(Annotation a : clazz.getDeclaredAnnotations()) { if(a.annotationType().equals(RunWith.class)) return false; } return true; } else { RunWith rw = clazz.getAnnotation(RunWith.class); if(rw != null) return !settings.ignoreRunner(rw.value().getName()); else return true; } }
private boolean hasSuitableRunnner(final Class<?> clazz) { final RunWith runWith = clazz.getAnnotation(RunWith.class); if (runWith != null) { return (runWith.value().equals(Suite.class)); } return false; }
@Override public Runner runnerForClass(Class<?> testClass) throws Exception { RunWith annotation = testClass.getAnnotation(RunWith.class); if (annotation != null) { return buildRunner(annotation.value(), testClass); } return null; }
private boolean isRunWithEnclosedRunner( Class testClass ) { @SuppressWarnings( "unchecked" ) org.junit.runner.RunWith runWithAnnotation = (org.junit.runner.RunWith) testClass.getAnnotation( org.junit.runner.RunWith.class ); return ( runWithAnnotation != null && Enclosed.class.equals( runWithAnnotation.value() ) ); }
@Override public boolean isConcordionFixture(Class<?> clazz) { RunWith annotation = clazz.getAnnotation(RunWith.class); return annotation != null && ConcordionRunner.class.isAssignableFrom(annotation.value()); } }
@Override public boolean isConcordionFixture(Class<?> clazz) { RunWith annotation = clazz.getAnnotation(RunWith.class); return annotation != null && ConcordionRunner.class.isAssignableFrom(annotation.value()); } }
private boolean isATaggable(Class<?> testClass) { RunWith runWith = testClass.getAnnotation(RunWith.class); return (runWith != null && Taggable.class.isAssignableFrom(runWith.value())); }
private boolean hasSuitableRunnner(final Class<?> clazz) { final RunWith runWith = clazz.getAnnotation(RunWith.class); if (runWith != null) { return (runWith.value().equals(Suite.class)); } return false; }
public boolean isClassCompatible() { RunWith annotations = junitTest.getAnnotation(RunWith.class); return annotations == null || !annotations.value().getName().equals("org.junit.runners.Parameterized"); }
private boolean serenityTestCase(Class<?> testClass) { RunWith runWithAnnotation = testClass.getAnnotation(RunWith.class); if (runWithAnnotation != null) { return LEGAL_SERENITY_RUNNER_NAMES.contains(runWithAnnotation.value().getSimpleName()); } return false; }
public static boolean isASerenityTestCase(Class<?> testClass) { return (testClass != null) && (testClass.getAnnotation(RunWith.class) != null) && (testClass.getAnnotation(RunWith.class).value().toString().contains("Serenity") || testClass.getAnnotation(RunWith.class).value().toString().contains("Thucydides")); } }
protected boolean isTestOnArkContainer(Description description) { RunWith runWith = description.getTestClass().getAnnotation(RunWith.class); if (runWith == null) { return false; } Class<?> runnerClass = runWith.value(); String className = runnerClass.getName(); return ARK_JUNIT4_RUNNER.equals(className) || ARK_BOOT_RUNNER.equals(className); }
@Override public Runner runnerForClass(Class<?> testClass) throws Exception { RunWith annotation = testClass.getAnnotation(RunWith.class); if (annotation != null) { return buildRunner(annotation.value(), testClass); } return null; }
public SingularServerSpringMockitoTestConfig(Object myTestClass) { if (myTestClass.getClass().isAnnotationPresent(RunWith.class)) { Class<? extends Runner> runnerClass = myTestClass.getClass().getDeclaredAnnotation(RunWith.class).value(); if (runnerClass.isAssignableFrom(MockitoJUnitRunner.class)) { this.myTestClass = myTestClass; return; } } throw new IllegalArgumentException(this.getClass().getName() + " somente funciona com classes de teste cujo runner seja do tipo: " + MockitoJUnitRunner.class.getName()); }
@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) { //For Android Class<? extends Runner> runnerClass = useAndroidRunner(annotation.value()); return buildRunner(runnerClass, 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 { RunWith annotation = testClass.getAnnotation(RunWith.class); if (annotation != null) { //For Android Class<? extends Runner> runnerClass = useAndroidRunner(annotation.value()); return buildRunner(runnerClass, testClass); } return null; }