Class IsTestFactoryMethod

  • All Implemented Interfaces:
    java.util.function.Predicate<java.lang.reflect.Method>

    @API(status=INTERNAL,
         since="5.0")
    public class IsTestFactoryMethod
    extends IsTestableMethod
    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
    • Field Detail

      • EXPECTED_RETURN_TYPE_MESSAGE

        private static final java.lang.String EXPECTED_RETURN_TYPE_MESSAGE
    • Method Detail

      • 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)