public abstract class Verifier extends java.lang.Object implements TestRule
public static class ErrorLogVerifier() {
private ErrorLog errorLog = new ErrorLog();
@Rule
public Verifier verifier = new Verifier() {
@Override public void verify() {
assertTrue(errorLog.isEmpty());
}
}
@Test public void testThatMightWriteErrorLog() {
// ...
}
}
| Constructor and Description |
|---|
Verifier() |
| Modifier and Type | Method and Description |
|---|---|
Statement |
apply(Statement base,
Description description)
Modifies the method-running
Statement to implement this
test-running rule. |
protected void |
verify()
Override this to add verification logic.
|
public Statement apply(Statement base, Description description)
TestRuleStatement to implement this
test-running rule.apply in interface TestRulebase - The Statement to be modifieddescription - A Description of the test implemented in basebase,
a wrapper around base, or a completely new Statement.protected void verify()
throws java.lang.Throwable
java.lang.Throwable