public interface ExternalResource extends TestListenerRule
This interface is provided here as a facility for rule provider, which will
implement the before() and after() methods. The idea is to
support use case that access some external system which need preparation and
cleanup between each test.
To use this interface, implementer should :
before() with the code that prepare the
external resource (creation of folder, start of server, etc).after() with the code that cleanup the
external resource (destruction of folder, shutdown of server, etc). This
method is used even in case the test is in failure or error.| Modifier and Type | Method and Description |
|---|---|
default void |
after()
Code to be done after.
|
default void |
before()
Code to be done before
|
default void |
onEnd(TestContext<Object> context)
Method used at the end of the test.
|
default void |
onStart(TestContext<Object> context)
Method used at the start of the test.
|
computeStatement, onAssumptionSkip, onError, onFailuredefault void onStart(TestContext<Object> context)
TestListenerRuleDefault implementation is to do nothing.
onStart in interface TestListenerRulecontext - the test contextdefault void onEnd(TestContext<Object> context)
TestListenerRuleDefault implementation is to do nothing.
onEnd in interface TestListenerRulecontext - the test contextdefault void before()
default void after()
Copyright © 2014. All rights reserved.