Class Description

    • Method Detail

      • createSuiteDescription

        public static Description createSuiteDescription​(Class<?> testClass)
      • getDisplayName

        public String getDisplayName()
        Returns:
        a user-understandable label
      • addChild

        public void addChild​(Description description)
        Add Description as a child of the receiver.
        Parameters:
        description - the soon-to-be child.
      • getChildren

        public ArrayList<Description> getChildren()
        Gets the copy of the children of this Description. Returns an empty list if there are no children.
      • isSuite

        public boolean isSuite()
        Returns:
        true if the receiver is a suite
      • isTest

        public boolean isTest()
        Returns:
        true if the receiver is an atomic test
      • testCount

        public int testCount()
        Returns:
        the total number of atomic tests in the receiver
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • isEmpty

        public boolean isEmpty()
        Returns:
        true if this is a description of a Runner that runs no tests
      • childlessCopy

        public Description childlessCopy()
        Returns:
        a copy of this description, with no children (on the assumption that some of the children will be added back)
      • getAnnotation

        public <T extends Annotation> T getAnnotation​(Class<T> annotationType)
        Returns:
        the annotation of type annotationType that is attached to this description node, or null if none exists
      • getAnnotations

        public Collection<Annotation> getAnnotations()
        Returns:
        all of the annotations attached to this description node
      • getTestClass

        public Class<?> getTestClass()
        Returns:
        If this describes a method invocation, the class of the test instance.
      • getClassName

        public String getClassName()
        Returns:
        If this describes a method invocation, the name of the class of the test instance
      • getMethodName

        public String getMethodName()
        Returns:
        If this describes a method invocation, the name of the method (or null if not)