Uses of Package
org.junit.rules
Packages that use org.junit.rules
-
Classes in org.junit.rules used by org.junit.rulesClassDescriptionThe
ExpectedException
rule allows you to verify that your code throws a specific exception.Builds special matcher used byExpectedException
.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:A MethodRule is an alteration in how a test method is run and reported.TheRuleChain
can be used for creating composite rules.The TemporaryFolder Rule allows creation of files and folders that should be deleted when the test method finishes (whether it passes or fails).Builds an instance ofTemporaryFolder
.A TestRule is an alteration in how a test method, or set of test methods, is run and reported.TestWatcher is a base class for Rules that take note of the testing action, without modifying it.The Timeout Rule applies the same timeout to all test methods in a class:Builder forTimeout
.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 -
Classes in org.junit.rules used by org.junit.runnersClassDescriptionA MethodRule is an alteration in how a test method is run and reported.A TestRule is an alteration in how a test method, or set of test methods, is run and reported.