Class TestUtils


  • public class TestUtils
    extends Object
    • Method Detail

      • singleton

        public static TestUtils singleton()
      • getDisplayName

        public static String getDisplayName​(Class<?> testClass)
        Method to get a test method display name
        Parameters:
        testClass - testClass
        Returns:
        the display name
      • getDisplayName

        public static String getDisplayName​(Method testMethod)
        Method to get a test method display name
        Parameters:
        testMethod - testMethod
        Returns:
        the display name
      • getTag

        public static String getTag​(AnnotatedElement annotatedElement)
        Method to get a test class tag value
        Parameters:
        annotatedElement - annotatedElement
        Returns:
        the tag value
      • orderTestMethods

        public static List<Method> orderTestMethods​(List<Method> testMethods,
                                                    org.junit.platform.commons.support.HierarchyTraversalMode hierarchyTraversalMode)
        Method to order test methods within the hierarchy, keeping the groups by component type / declaring class
        Parameters:
        testMethods - testMethods
        Returns:
        the list of methods ordered