Class TestEngineReflectionUtils


  • public final class TestEngineReflectionUtils
    extends Object
    Class to implement methods to get test class fields / methods, caching the information
    • Method Detail

      • getBeforeClassMethods

        public static Collection<Method> getBeforeClassMethods​(Class<?> clazz)
        Method to get a Collection of @TestEngine.BeforeClass Methods sorted alphabetically
        Parameters:
        clazz -
        Returns:
      • getParameterSupplierMethod

        public static Collection<Method> getParameterSupplierMethod​(Class<?> clazz)
        Method to get a Collection of @TestEngine.ParameterSupplier Methods sorted alphabetically
        Parameters:
        clazz -
        Returns:
      • getParameterMethods

        public static Collection<Method> getParameterMethods​(Class<?> clazz)
        Method to get a Collection of @TestEngine.Parameter Methods sorted alphabetically
        Parameters:
        clazz -
        Returns:
      • getBeforeAllMethods

        public static Collection<Method> getBeforeAllMethods​(Class<?> clazz)
        Method to get a Collection of @TestEngine.BeforeAll Methods sorted alphabetically
        Parameters:
        clazz -
        Returns:
      • getBeforeEachMethods

        public static Collection<Method> getBeforeEachMethods​(Class<?> clazz)
        Method to get a Collection of @TestEngine.BeforeEach Methods sorted alphabetically
        Parameters:
        clazz -
        Returns:
      • getTestMethods

        public static Collection<Method> getTestMethods​(Class<?> clazz)
        Method to get a Collection of @TestEngine.Test Methods sorted alphabetically
        Parameters:
        clazz -
        Returns:
      • getAfterEachMethods

        public static Collection<Method> getAfterEachMethods​(Class<?> clazz)
        Method to get a Collection of @TestEngine.AfterEach Methods sorted alphabetically
        Parameters:
        clazz -
        Returns:
      • getAfterAllMethods

        public static Collection<Method> getAfterAllMethods​(Class<?> clazz)
        Method to get a Collection of @TestEngine.AfterAll Methods sorted alphabetically
        Parameters:
        clazz -
        Returns:
      • getAfterClassMethods

        public static Collection<Method> getAfterClassMethods​(Class<?> clazz)
        Method to get a Collection of @TestEngine.AfterClass Methods sorted alphabetically
        Parameters:
        clazz -
        Returns:
      • isBaseClass

        public static boolean isBaseClass​(Class<?> clazz)
        Method to get whether a test class is a base class
        Parameters:
        clazz -
        Returns:
      • isDisabled

        public static boolean isDisabled​(Class<?> clazz)
        Method to get whether a test class is disabled
        Parameters:
        clazz -
        Returns:
      • isDisabled

        public static boolean isDisabled​(Method method)
        Method to get whether a test Method is disabled
        Parameters:
        method -
        Returns:
      • createTestPlan

        public static org.junit.platform.launcher.TestPlan createTestPlan​(org.junit.platform.engine.TestDescriptor testDescriptor,
                                                                          org.junit.platform.engine.ConfigurationParameters configurationParameters)
        Method to create a TestPlan from a TestDescriptor
        Parameters:
        testDescriptor -
        configurationParameters -
        Returns: