Package com.opencqrs.framework.command
Class CommandHandlingTestFixture.Builder<I>
java.lang.Object
com.opencqrs.framework.command.CommandHandlingTestFixture.Builder<I>
- Type Parameters:
I
- the generic type of the instance to be event sourced before handling the command
- Enclosing class:
CommandHandlingTestFixture<I,
C extends Command, R>
Builder for
CommandHandlingTestFixture
.-
Method Summary
Modifier and TypeMethodDescription<C extends Command,
R>
CommandHandlingTestFixture<I, C, R> using
(CommandHandlerDefinition<I, C, R> definition) Initializes theCommandHandlingTestFixture
using the givenCommandHandlerDefinition
.<C extends Command,
R>
CommandHandlingTestFixture<I, C, R> using
(Class<I> instanceClass, CommandHandler<I, C, R> handler) Initializes theCommandHandlingTestFixture
using the givenCommandHandler
.
-
Method Details
-
using
public <C extends Command,R> CommandHandlingTestFixture<I,C, usingR> (CommandHandlerDefinition<I, C, R> definition) Initializes theCommandHandlingTestFixture
using the givenCommandHandlerDefinition
.- Type Parameters:
C
- the command typeR
- the command execution result type- Parameters:
definition
- theCommandHandlerDefinition
under test- Returns:
- a fully initialized test fixture
-
using
public <C extends Command,R> CommandHandlingTestFixture<I,C, usingR> (Class<I> instanceClass, CommandHandler<I, C, R> handler) Initializes theCommandHandlingTestFixture
using the givenCommandHandler
.- Type Parameters:
C
- the command typeR
- the command execution result type- Parameters:
instanceClass
- the state instance classhandler
- theCommandHandler
under test- Returns:
- a fully initialized test fixture
-