Class IsTestClassWithTests
java.lang.Object
org.junit.jupiter.engine.discovery.predicates.IsTestClassWithTests
- All Implemented Interfaces:
java.util.function.Predicate<java.lang.Class<?>>
@API(status=INTERNAL,
since="5.1")
public class IsTestClassWithTests
extends java.lang.Object
implements java.util.function.Predicate<java.lang.Class<?>>
Test if a class is a JUnit Jupiter test class containing executable tests,
test factories, test templates, or nested tests.
- Since:
- 5.0
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.Predicate<java.lang.reflect.Method>isTestOrTestFactoryOrTestTemplateMethod -
Constructor Summary
Constructors Constructor Description IsTestClassWithTests() -
Method Summary
Modifier and Type Method Description booleantest(java.lang.Class<?> candidate)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.Predicate
and, negate, or
-
Field Details
-
isTestOrTestFactoryOrTestTemplateMethod
public static final java.util.function.Predicate<java.lang.reflect.Method> isTestOrTestFactoryOrTestTemplateMethod
-
-
Constructor Details
-
IsTestClassWithTests
public IsTestClassWithTests()
-
-
Method Details
-
test
public boolean test(java.lang.Class<?> candidate)- Specified by:
testin interfacejava.util.function.Predicate<java.lang.Class<?>>
-