Package org.axonframework.test.aggregate
Class StubAggregateLifecycleRule
java.lang.Object
org.axonframework.messaging.Scope
org.axonframework.modelling.command.AggregateLifecycle
org.axonframework.test.aggregate.StubAggregateLifecycle
org.axonframework.test.aggregate.StubAggregateLifecycleRule
- All Implemented Interfaces:
org.junit.rules.TestRule
@Deprecated
public class StubAggregateLifecycleRule
extends StubAggregateLifecycle
implements org.junit.rules.TestRule
Deprecated.
Implementation of StubAggregateLifecycle that can be used as an
Rule annotated method or field in a
test class. In that case, the JUnit lifecycle will automatically register and deregister the StubAggregateLifecycle.
Usage example:
@Rule
public StubAggregateLifecycleRule lifecycle = new StubAggregateLifecycleRule();
@Test
public void testMethod() {
... perform tests ...
// get applied events from lifecycle to validate some more
lifecycle.getAppliedEvents();
}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.junit.runners.model.Statementapply(org.junit.runners.model.Statement base, org.junit.runner.Description description) Deprecated.Methods inherited from class org.axonframework.test.aggregate.StubAggregateLifecycle
activate, close, doApply, doCreateNew, doMarkDeleted, getAppliedEventPayloads, getAppliedEvents, getIsLive, identifier, isMarkedDeleted, type, versionMethods inherited from class org.axonframework.modelling.command.AggregateLifecycle
apply, apply, createNew, describeScope, execute, getInstance, getVersion, isLive, markDeletedMethods inherited from class org.axonframework.messaging.Scope
describeCurrentScope, endScope, executeWithResult, getCurrentScope, startScope
-
Constructor Details
-
StubAggregateLifecycleRule
public StubAggregateLifecycleRule()Deprecated.
-
-
Method Details
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description) Deprecated.- Specified by:
applyin interfaceorg.junit.rules.TestRule
-
StubAggregateLifecycleExtensionto be used in combination with Junit 5