You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JUnit 4 extension for recheck. Automatic set up and tear down of tests using recheck.
Features
Calls startTest on given RecheckLifecycle object before each test.
Calls capTest on given RecheckLifecycle object after each test.
Calls cap on given RecheckLifecycle object after each test.
Advantages
The extension automatically calls startTest, capTest and cap. So it is no longer required to call those methods manually. This reduces boilerplate code and ensures the life cycle within a test using recheck.
Build tools
You can add recheck-junit-4-extension as an external dependency to your project. It is available in Maven central or via the release-page, which allows you to include it into your favorite build tool.
For the current version, please refer to the release-page.
Recheck JUnit extension defines a JUnit 4 Rule. The rule needs to know the instance of the used RecheckLifecycle element. The instance can be given during construction or afterwards during setup. The following code demonstrates both ways.
Recheck instance given during construction
// Define RecheckLifecycle instance before RuleprivateRecheckLifecyclere = newRecheckImpl();
// Let rule know which RecheckLifecycle instance should be administered@RulepublicRecheckRulerecheckRule = newRecheckRule(re);
Recheck instance given during setup
@RulepublicRecheckRulerecheckRule = newRecheckRule();
privateRecheckLifecyclere;
@Beforepublicvoidbefore() {
re = newRecheckImpl();
// Let rule know which RecheckLifecycle instance should be administeredrecheckRule.use(re);
}