Class 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 Detail

      • isTestMethod

        private static final IsTestMethod isTestMethod
      • isTestOrTestFactoryOrTestTemplateMethod

        public static final java.util.function.Predicate<java.lang.reflect.Method> isTestOrTestFactoryOrTestTemplateMethod
    • Constructor Detail

      • IsTestClassWithTests

        public IsTestClassWithTests()
    • Method Detail

      • test

        public boolean test​(java.lang.Class<?> candidate)
        Specified by:
        test in interface java.util.function.Predicate<java.lang.Class<?>>
      • hasTestOrTestFactoryOrTestTemplateMethods

        private boolean hasTestOrTestFactoryOrTestTemplateMethods​(java.lang.Class<?> candidate)
      • hasNestedTests

        private boolean hasNestedTests​(java.lang.Class<?> candidate)