public class TestClassPredicate extends Object implements Predicate<Class<?>>, Serializable
Predicate that can be used to determine whether a
Class is a valid JUnit test or suite class.
Copyright (c) 2016. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
| Constructor and Description |
|---|
TestClassPredicate() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
hasMethodsAnnotatedWithTest(Class<?> testClass)
Determine whether the specified
Class has any methods
annotated with the JUnit Test annotation. |
protected boolean |
hasSuiteMethod(Class<?> testClass)
Determine whether the specified
Class has a public
static suite() method. |
protected boolean |
isAnnotatedWithRunWith(Class<?> testClass)
Determine whether the specified
Class is annotated with
the JUnit RunWith annotation. |
boolean |
isJUnit3(Class<?> testClass)
|
protected boolean |
isJUnit4(Class<?> testClass)
|
protected boolean |
isJUnit48(Class<?> testClass)
|
boolean |
test(Class<?> testClass) |
protected boolean |
usesRunWithEnclosed(Class<?> testClass)
Determine whether the specified
Class is annotated with
the JUnit RunWith annotation and the runner specified
in the annotation is the Enclosed runner. |
public boolean isJUnit3(Class<?> testClass)
protected boolean isJUnit4(Class<?> testClass)
protected boolean isJUnit48(Class<?> testClass)
protected boolean hasSuiteMethod(Class<?> testClass)
Class has a public
static suite() method.protected boolean isAnnotatedWithRunWith(Class<?> testClass)
Class is annotated with
the JUnit RunWith annotation.protected boolean hasMethodsAnnotatedWithTest(Class<?> testClass)
Class has any methods
annotated with the JUnit Test annotation.Copyright © 2017. All rights reserved.