Class IsTestFactoryMethod

java.lang.Object
org.junit.jupiter.engine.discovery.predicates.IsTestFactoryMethod
All Implemented Interfaces:
Predicate<Method>

@API(status=INTERNAL, since="5.0") public class IsTestFactoryMethod extends Object
Test if a method is a JUnit Jupiter @TestFactory method.

NOTE: this predicate does not check if a candidate method has an appropriate return type for a @TestFactory method.

Since:
5.0
  • Constructor Details

    • IsTestFactoryMethod

      public IsTestFactoryMethod(org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)
  • Method Details

    • test

      public boolean test(Method candidate)
      Specified by:
      test in interface Predicate<Method>
    • hasVoidReturnType

      protected static org.junit.platform.engine.support.discovery.DiscoveryIssueReporter.Condition<Method> hasVoidReturnType(Class<? extends Annotation> annotationType, org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)
    • createIssue

      protected static org.junit.platform.engine.DiscoveryIssue createIssue(Class<? extends Annotation> annotationType, Method method, String condition)