Package org.apache.flink.core.testutils
Interface CustomExtension
- All Known Implementing Classes:
TestContainerExtension
public interface CustomExtension
An extension that is invoked before/after all/each tests, depending on whether it is wrapped in a
EachCallbackWrapper or AllCallbackWrapper.
before method will be called in beforeEach or beforeAll. after
will be called in afterEach or afterAll.
Usage example:
public class Test{
CustomExtension eachCustom = new CustomExtensionImpl1();
CustomExtension allCustom = new CustomExtensionImpl2();
@RegisterExtension
static AllCallbackWrapper allWrapper = new AllCallbackWrapper(allCustom);
@RegisterExtension
EachCallbackWrapper eachWrapper = new EachCallbackWrapper(eachCustom);
}
A CustomExtension instance must not be wrapped in both AllCallbackWrapper and
EachCallbackWrapper for the same test class.
-
Method Summary