Uses of Interface
org.junit.rules.TestRule

Packages that use TestRule
Package
Description
 
Provides standard Runner implementations.
  • Uses of TestRule in org.junit.rules

    Classes in org.junit.rules that implement TestRule
    Modifier and Type
    Class
    Description
    class 
    The DisableOnDebug Rule allows you to label certain rules to be disabled when debugging.
    class 
    The ErrorCollector rule allows execution of a test to continue after the first problem is found (for example, to collect _all_ the incorrect rows in a table, and report them all at once):
    class 
    The ExpectedException rule allows you to verify that your code throws a specific exception.
    class 
    A base class for Rules (like TemporaryFolder) that set up an external resource before a test (a file, socket, server, database connection, etc.), and guarantee to tear it down afterward:
    class 
    The RuleChain can be used for creating composite rules.
    class 
    The Stopwatch Rule notifies one of its own protected methods of the time spent by a test.
    class 
    The TemporaryFolder Rule allows creation of files and folders that should be deleted when the test method finishes (whether it passes or fails).
    class 
    The TestName Rule makes the current test name available inside test methods:
    class 
    TestWatcher is a base class for Rules that take note of the testing action, without modifying it.
    class 
    The Timeout Rule applies the same timeout to all test methods in a class:
    class 
    Verifier is a base class for Rules like ErrorCollector, which can turn otherwise passing test methods into failing tests if a verification check is failed
    Methods in org.junit.rules with parameters of type TestRule
    Modifier and Type
    Method
    Description
    RuleChain.around(TestRule enclosedRule)
    Create a new RuleChain, which encloses the given TestRule with the rules of the current RuleChain.
    static RuleChain
    RuleChain.outerRule(TestRule outerRule)
    Returns a RuleChain with a single TestRule.
    Constructors in org.junit.rules with parameters of type TestRule
    Modifier
    Constructor
    Description
     
    Create a DisableOnDebug instance with the timeout specified in milliseconds.
    Constructor parameters in org.junit.rules with type arguments of type TestRule
    Modifier
    Constructor
    Description
     
    RunRules(Statement base, Iterable<TestRule> rules, Description description)
     
  • Uses of TestRule in org.junit.runners

    Methods in org.junit.runners that return types with arguments of type TestRule
    Modifier and Type
    Method
    Description
    protected List<TestRule>
    ParentRunner.classRules()
     
    protected List<TestRule>
    BlockJUnit4ClassRunner.getTestRules(Object target)