Class JUnit4ClassRunner

java.lang.Object
org.junit.runner.Runner
org.junit.internal.runners.JUnit4ClassRunner
All Implemented Interfaces:
Describable, Filterable, Sortable

@Deprecated public class JUnit4ClassRunner extends Runner implements Filterable, Sortable
Deprecated.
Included for backwards compatibility with JUnit 4.4. Will be removed in the next major release. Please use BlockJUnit4ClassRunner in place of JUnit4ClassRunner.
  • Constructor Details

  • Method Details

    • getTestMethods

      protected List<Method> getTestMethods()
      Deprecated.
    • validate

      protected void validate() throws InitializationError
      Deprecated.
      Throws:
      InitializationError
    • run

      public void run(RunNotifier notifier)
      Deprecated.
      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
    • runMethods

      protected void runMethods(RunNotifier notifier)
      Deprecated.
    • getDescription

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

      protected Annotation[] classAnnotations()
      Deprecated.
    • getName

      protected String getName()
      Deprecated.
    • createTest

      protected Object createTest() throws Exception
      Deprecated.
      Throws:
      Exception
    • invokeTestMethod

      protected void invokeTestMethod(Method method, RunNotifier notifier)
      Deprecated.
    • wrapMethod

      protected TestMethod wrapMethod(Method method)
      Deprecated.
    • testName

      protected String testName(Method method)
      Deprecated.
    • methodDescription

      protected Description methodDescription(Method method)
      Deprecated.
    • testAnnotations

      protected Annotation[] testAnnotations(Method method)
      Deprecated.
    • filter

      public void filter(Filter filter) throws NoTestsRemainException
      Deprecated.
      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)
      Deprecated.
      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
    • getTestClass

      protected TestClass getTestClass()
      Deprecated.