Module junit
Package org.junit.rules
-
Interface Summary Interface Description MethodRule A MethodRule is an alteration in how a test method is run and reported.TestRule A TestRule is an alteration in how a test method, or set of test methods, is run and reported. -
Class Summary Class Description DisableOnDebug TheDisableOnDebugRule allows you to label certain rules to be disabled when debugging.ErrorCollector 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):ExpectedException TheExpectedExceptionrule allows you to verify that your code throws a specific exception.ExpectedExceptionMatcherBuilder Builds special matcher used byExpectedException.ExternalResource 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:RuleChain TheRuleChaincan be used for creating composite rules.RunRules Runs a collection of rules on a statement.Stopwatch The Stopwatch Rule notifies one of its own protected methods of the time spent by a test.Stopwatch.Clock TemporaryFolder The TemporaryFolder Rule allows creation of files and folders that should be deleted when the test method finishes (whether it passes or fails).TemporaryFolder.Builder Builds an instance ofTemporaryFolder.TestName The TestName Rule makes the current test name available inside test methods:TestWatcher TestWatcher is a base class for Rules that take note of the testing action, without modifying it.TestWatchman Deprecated. UseTestWatcher(which implementsTestRule) instead.Timeout The Timeout Rule applies the same timeout to all test methods in a class:Timeout.Builder Builder forTimeout.Verifier 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