Class IsTestFactoryMethod
- java.lang.Object
-
- org.junit.jupiter.engine.discovery.predicates.IsTestableMethod
-
- org.junit.jupiter.engine.discovery.predicates.IsTestFactoryMethod
-
- All Implemented Interfaces:
java.util.function.Predicate<java.lang.reflect.Method>
@API(status=INTERNAL, since="5.0") public class IsTestFactoryMethod extends IsTestableMethodTest if a method is a JUnit Jupiter@TestFactorymethod.NOTE: this predicate does not check if a candidate method has an appropriate return type for a
@TestFactorymethod.- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringEXPECTED_RETURN_TYPE_MESSAGE
-
Constructor Summary
Constructors Constructor Description IsTestFactoryMethod(DiscoveryIssueReporter issueReporter)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static DiscoveryIssue.BuildercreateTooGenericReturnTypeIssue(java.lang.reflect.Method method)private static DiscoveryIssueReporter.Condition<java.lang.reflect.Method>hasCompatibleReturnType(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, DiscoveryIssueReporter issueReporter)private static booleanisCompatible(java.lang.reflect.Method method, DiscoveryIssueReporter issueReporter)private static booleanisCompatibleContainerType(java.lang.reflect.Method method, DiscoveryIssueReporter issueReporter)-
Methods inherited from class org.junit.jupiter.engine.discovery.predicates.IsTestableMethod
createIssue, hasVoidReturnType, test
-
-
-
-
Constructor Detail
-
IsTestFactoryMethod
public IsTestFactoryMethod(DiscoveryIssueReporter issueReporter)
-
-
Method Detail
-
hasCompatibleReturnType
private static DiscoveryIssueReporter.Condition<java.lang.reflect.Method> hasCompatibleReturnType(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, DiscoveryIssueReporter issueReporter)
-
isCompatible
private static boolean isCompatible(java.lang.reflect.Method method, DiscoveryIssueReporter issueReporter)
-
isCompatibleContainerType
private static boolean isCompatibleContainerType(java.lang.reflect.Method method, DiscoveryIssueReporter issueReporter)
-
createTooGenericReturnTypeIssue
private static DiscoveryIssue.Builder createTooGenericReturnTypeIssue(java.lang.reflect.Method method)
-
-