public class PersistentEntityTestDriver<C,E,S>
extends Object
PersistentEntity
emits expected events and side-effects in response to incoming commands.
It also verifies that all commands, events, replies and state are
serializable, and reports any such problems in the issues
of the Outcome
.
Constructor and Description |
---|
PersistentEntityTestDriver(akka.actor.ActorSystem system,
PersistentEntity<C,E,S> entity,
String entityId) |
Modifier and Type | Method and Description |
---|---|
java.util.List<PersistentEntityTestDriver.Issue> |
getAllIssues()
Accumulated issues from all previous runs.
|
PersistentEntityTestDriver.Outcome<E,S> |
run(Object... commands)
The entity will process the commands and the emitted events and side effects
are recorded and provided in the returned
Outcome . |
PersistentEntityTestDriver.Outcome<E,S> |
run(scala.collection.Seq<C> commands)
The entity will process the commands and the emitted events and side effects
are recorded and provided in the returned
Outcome . |
public PersistentEntityTestDriver(akka.actor.ActorSystem system, PersistentEntity<C,E,S> entity, String entityId)
public PersistentEntityTestDriver.Outcome<E,S> run(Object... commands)
Outcome
. Current state is also
included in the Outcome
.
run
may be invoked multiple times to divide the sequence of commands
into manageable steps. The Outcome
contains the events and side-effects of
the last run
, but the state is not reset between different runs.
public PersistentEntityTestDriver.Outcome<E,S> run(scala.collection.Seq<C> commands)
Outcome
. Current state is also
included in the Outcome
.
run
may be invoked multiple times to divide the sequence of commands
into manageable steps. The Outcome
contains the events and side-effects of
the last run
, but the state is not reset between different runs.
public java.util.List<PersistentEntityTestDriver.Issue> getAllIssues()