public class AggregateFactory<A,T> extends Object
| Constructor and Description |
|---|
AggregateFactory(Function<T,A> initializer,
StateBuilder<T> stateBuilder) |
| Modifier and Type | Method and Description |
|---|---|
A |
fromCommands(Command<A>... commands)
Builds an aggregate root instance from a number of commands, useful for scenario testing.
|
A |
fromCommands(List<Command<A>> commands) |
static <A,T> AggregateFactory<A,T> |
newFactory(Function<T,A> initializer,
StateBuilder<T> stateBuilder) |
public AggregateFactory(Function<T,A> initializer, StateBuilder<T> stateBuilder)
@SafeVarargs public final A fromCommands(Command<A>... commands)
commands - the commands to apply to build the aggregate rootpublic static <A,T> AggregateFactory<A,T> newFactory(Function<T,A> initializer, StateBuilder<T> stateBuilder)
Copyright © 2019. All rights reserved.