public class FailureDetectingExternalResource
extends java.lang.Object
implements org.junit.rules.TestRule
TestRule
which is called before and after each test, and also is notified on success/failure.
This mimics the behaviour of TestWatcher to some degree, but failures occurring in this rule do not
contribute to the overall failure count (which can otherwise cause strange negative test success
figures).Constructor and Description |
---|
FailureDetectingExternalResource() |
Modifier and Type | Method and Description |
---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
protected void |
failed(java.lang.Throwable e,
org.junit.runner.Description description) |
protected void |
finished(org.junit.runner.Description description) |
protected void |
starting(org.junit.runner.Description description) |
protected void |
succeeded(org.junit.runner.Description description) |
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
apply
in interface org.junit.rules.TestRule
protected void starting(org.junit.runner.Description description)
protected void succeeded(org.junit.runner.Description description)
protected void failed(java.lang.Throwable e, org.junit.runner.Description description)
protected void finished(org.junit.runner.Description description)