public class StubAggregateLifecycleExtension extends StubAggregateLifecycle implements org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.BeforeEachCallback
StubAggregateLifecycle
that can be used as an RegisterExtension
annotated method or field in a test class. In that case, the JUnit lifecycle will automatically register and
unregister the StubAggregateLifecycle
.
Usage example:
@RegisterExtension public StubAggregateLifecycleExtension lifecycle = new StubAggregateLifecycleExtension(); @Test public void testMethod() { ... perform tests ... // get applied events from lifecycle to validate some more lifecycle.getAppliedEvents(); }
Constructor and Description |
---|
StubAggregateLifecycleExtension() |
Modifier and Type | Method and Description |
---|---|
void |
afterEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext) |
void |
beforeEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext) |
activate, close, doApply, doCreateNew, doMarkDeleted, getAppliedEventPayloads, getAppliedEvents, getIsLive, identifier, isMarkedDeleted, type, version
apply, apply, createNew, describeScope, execute, getInstance, getVersion, isLive, markDeleted
describeCurrentScope, endScope, executeWithResult, getCurrentScope, startScope
Copyright © 2010–2022. All rights reserved.