public class DeleteEsDataRule extends java.lang.Object implements JunitJupiterExtensionLikeTestRule
TestRule
to remove data from Elasticsearch either before all tests, or before each test.Constructor and Description |
---|
DeleteEsDataRule()
Constructor
|
DeleteEsDataRule(EsDataLoader loader)
Constructor using the given loader.
|
Modifier and Type | Method and Description |
---|---|
void |
afterAll(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
Callback that is called after all tests are executed.
|
void |
before(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
Callback that is called after a test is executed.
|
void |
beforeAll(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
Callback that is called before all tests are executed.
|
protected static <A extends java.lang.annotation.Annotation> |
findMergedAnnotation(java.lang.reflect.AnnotatedElement element,
java.lang.Class<A> annotationType) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
after, apply, verify, verifyAll
public DeleteEsDataRule()
public DeleteEsDataRule(EsDataLoader loader)
loader
- the loaderpublic void beforeAll(org.junit.runners.model.Statement base, org.junit.runner.Description description) throws java.lang.Exception
JunitJupiterExtensionLikeTestRule
beforeAll
in interface JunitJupiterExtensionLikeTestRule
base
- The Statement
to be modifieddescription
- A Description
of the test implemented in base
java.lang.Exception
- if an error occurrespublic void before(org.junit.runners.model.Statement base, org.junit.runner.Description description) throws java.lang.Exception
JunitJupiterExtensionLikeTestRule
before
in interface JunitJupiterExtensionLikeTestRule
base
- The Statement
to be modifieddescription
- A Description
of the test implemented in base
java.lang.Exception
- if an error occurrespublic void afterAll(org.junit.runners.model.Statement base, org.junit.runner.Description description) throws java.lang.Exception
JunitJupiterExtensionLikeTestRule
afterAll
in interface JunitJupiterExtensionLikeTestRule
base
- The Statement
to be modifieddescription
- A Description
of the test implemented in base
java.lang.Exception
- if an error occurresprotected static <A extends java.lang.annotation.Annotation> java.util.stream.Stream<A> findMergedAnnotation(java.lang.reflect.AnnotatedElement element, java.lang.Class<A> annotationType)