Class ScanningSuite

java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runner.Runner>
org.junit.runners.Suite
com.atlassian.confluence.util.test.ScanningSuite
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable

public class ScanningSuite extends org.junit.runners.Suite
A Suite that allows specifying patterns of names classes to include/exclude. Supports merging patterns specified in superclasses as well, to simplify writing focused test harnesses.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
     
    static @interface 
     
    static @interface 
     
    static @interface 
     
    static @interface 
     
    static enum 
     
    static @interface 
     

    Nested classes/interfaces inherited from class org.junit.runners.Suite

    org.junit.runners.Suite.SuiteClasses
  • Constructor Summary

    Constructors
    Constructor
    Description
    ScanningSuite(Class<?> annotatedClass, org.junit.runners.model.RunnerBuilder builder)
    Called reflectively on classes annotated with @RunWith(Suite.class)
  • Method Summary

    Modifier and Type
    Method
    Description
    static Class<?>[]
    findMatchingTestClasses(ClassResolver classResolver, Class<?> annotatedClass)
    Gets all matching annotations from the test class being run and its superclasses, and finds all matching classes on the classpath.

    Methods inherited from class org.junit.runners.Suite

    describeChild, emptySuite, getChildren, runChild

    Methods inherited from class org.junit.runners.ParentRunner

    childrenInvoker, classBlock, classRules, collectInitializationErrors, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, isIgnored, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolation

    Methods inherited from class org.junit.runner.Runner

    testCount

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ScanningSuite

      public ScanningSuite(Class<?> annotatedClass, org.junit.runners.model.RunnerBuilder builder) throws org.junit.runners.model.InitializationError
      Called reflectively on classes annotated with @RunWith(Suite.class)
      Parameters:
      annotatedClass - the root class
      builder - builds runners for classes in the suite
      Throws:
      org.junit.runners.model.InitializationError
  • Method Details

    • findMatchingTestClasses

      public static Class<?>[] findMatchingTestClasses(ClassResolver classResolver, Class<?> annotatedClass)
      Gets all matching annotations from the test class being run and its superclasses, and finds all matching classes on the classpath. This method is 'unsafe' in that it throws lots of exceptions that need to be handled.
      Parameters:
      annotatedClass - the test class
      Returns:
      the matching classes.