Uses of Interface
org.junit.rules.TestRule
Packages that use TestRule
-
Uses of TestRule in org.junit.rules
Classes in org.junit.rules that implement TestRuleModifier and TypeClassDescriptionclassTheDisableOnDebugRule allows you to label certain rules to be disabled when debugging.classThe 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):classTheExpectedExceptionrule allows you to verify that your code throws a specific exception.classA 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:classTheRuleChaincan be used for creating composite rules.classThe Stopwatch Rule notifies one of its own protected methods of the time spent by a test.private classclassThe TemporaryFolder Rule allows creation of files and folders that should be deleted when the test method finishes (whether it passes or fails).classThe TestName Rule makes the current test name available inside test methods:classTestWatcher is a base class for Rules that take note of the testing action, without modifying it.classThe Timeout Rule applies the same timeout to all test methods in a class:classVerifier is a base class for Rules like ErrorCollector, which can turn otherwise passing test methods into failing tests if a verification check is failedFields in org.junit.rules declared as TestRuleFields in org.junit.rules with type parameters of type TestRuleMethods in org.junit.rules with parameters of type TestRuleMethod parameters in org.junit.rules with type arguments of type TestRuleModifier and TypeMethodDescriptionprivate static StatementRunRules.applyAll(Statement result, Iterable<TestRule> rules, Description description) Constructors in org.junit.rules with parameters of type TestRuleModifierConstructorDescriptionDisableOnDebug(TestRule rule) Create aDisableOnDebuginstance with the timeout specified in milliseconds.(package private)DisableOnDebug(TestRule rule, List<String> inputArguments) Visible for testing purposes only.Constructor parameters in org.junit.rules with type arguments of type TestRule -
Uses of TestRule in org.junit.runners
Fields in org.junit.runners with type parameters of type TestRuleMethods in org.junit.runners that return types with arguments of type TestRuleModifier and TypeMethodDescriptionParentRunner.classRules()ParentRunner.ClassRuleCollector.getOrderedRules()BlockJUnit4ClassRunner.getTestRules(Object target) Methods in org.junit.runners with parameters of type TestRuleModifier and TypeMethodDescriptionvoidParentRunner.ClassRuleCollector.accept(FrameworkMember<?> member, TestRule value) void