Interface TestRunnerAdapter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T extends java.lang.annotation.Annotation>
      T
      getClassAnnotation​(java.lang.Class<T> annotation)
      Allows to access Class level annotation of currently running test
      <T extends java.lang.annotation.Annotation>
      T
      getMethodAnnotation​(java.lang.Class<T> annotation)
      Allows to access method level annotation of currently running test
      java.lang.Class<?> getTestClass()  
      java.lang.String getTestMethodName()  
    • Method Detail

      • getTestClass

        java.lang.Class<?> getTestClass()
        Returns:
        Class of currently running test
      • getTestMethodName

        java.lang.String getTestMethodName()
        Returns:
        method name (as String) of currently running test
      • getClassAnnotation

        <T extends java.lang.annotation.Annotation> T getClassAnnotation​(java.lang.Class<T> annotation)
        Allows to access Class level annotation of currently running test
        Type Parameters:
        T - the class annotation
        Parameters:
        annotation - interface you want to access
        Returns:
        Annotation instance
        Throws:
        AnnotationNotFoundException - when annotation you want to access couldn't be find
      • getMethodAnnotation

        <T extends java.lang.annotation.Annotation> T getMethodAnnotation​(java.lang.Class<T> annotation)
        Allows to access method level annotation of currently running test
        Type Parameters:
        T - the method annotation
        Parameters:
        annotation - interface you want to access
        Returns:
        Annotation instance
        Throws:
        AnnotationNotFoundException - of annotation you want to access couldn't be found