public class Verifier extends Object implements MethodRule
public static class ErrorLogVerifier() {
private ErrorLog errorLog = new ErrorLog();
@Rule
public MethodRule verifier = new Verifier() {
@Override public void verify() {
assertTrue(errorLog.isEmpty());
}
}
@Test public void testThatMightWriteErrorLog() {
// ...
}
}
| Constructor and Description |
|---|
Verifier() |
public Statement apply(Statement base, FrameworkMethod method, Object target)
MethodRuleStatement to implement an additional
test-running rule.apply in interface MethodRulebase - The Statement to be modifiedmethod - The method to be runtarget - The object on with the method will be run.base,
a wrapper around base, or a completely new Statement.