Class JUnit38ClassRunner

java.lang.Object
org.junit.runner.Runner
org.junit.internal.runners.JUnit38ClassRunner
All Implemented Interfaces:
Describable, Filterable, Orderable, Sortable
Direct Known Subclasses:
SuiteMethod

public class JUnit38ClassRunner extends Runner implements Filterable, Orderable
  • Field Details

    • test

      private volatile Test test
  • Constructor Details

    • JUnit38ClassRunner

      public JUnit38ClassRunner(Class<?> klass)
    • JUnit38ClassRunner

      public JUnit38ClassRunner(Test test)
  • Method Details

    • run

      public void run(RunNotifier notifier)
      Description copied from class: Runner
      Run the tests for this runner.
      Specified by:
      run in class Runner
      Parameters:
      notifier - will be notified of events while tests are being run--tests being started, finishing, and failing
    • createAdaptingListener

      public TestListener createAdaptingListener(RunNotifier notifier)
    • getDescription

      public Description getDescription()
      Specified by:
      getDescription in interface Describable
      Specified by:
      getDescription in class Runner
      Returns:
      a Description showing the tests to be run by the receiver
    • makeDescription

      private static Description makeDescription(Test test)
    • getAnnotations

      private static Annotation[] getAnnotations(TestCase test)
      Get the annotations associated with given TestCase.
      Parameters:
      test - the TestCase.
    • createSuiteDescription

      private static String createSuiteDescription(TestSuite ts)
    • filter

      public void filter(Filter filter) throws NoTestsRemainException
      Description copied from interface: Filterable
      Remove tests that don't pass the parameter filter.
      Specified by:
      filter in interface Filterable
      Parameters:
      filter - the Filter to apply
      Throws:
      NoTestsRemainException - if all tests are filtered out
    • sort

      public void sort(Sorter sorter)
      Description copied from interface: Sortable
      Sorts the tests using sorter
      Specified by:
      sort in interface Sortable
      Parameters:
      sorter - the Sorter to use for sorting the tests
    • order

      public void order(Orderer orderer) throws InvalidOrderingException
      Orders the tests using orderer
      Specified by:
      order in interface Orderable
      Throws:
      InvalidOrderingException - if orderer does something invalid (like remove or add children)
      Since:
      4.13
    • setTest

      private void setTest(Test test)
    • getTest

      private Test getTest()