org.axonframework.test
Interface TestExecutor

All Known Implementing Classes:
GivenWhenThenTestFixture

public interface TestExecutor

Interface describing the operations available on a test fixture in the execution stage. In this stage, there is only on operation: when(Object), which dispatches a command on this fixture's Command Bus.

Since:
0.6
Author:
Allard Buijze

Method Summary
 ResultValidator when(Object command)
          Dispatches the given command to the appropriate command handler and records all activity in the fixture for result validation.
 ResultValidator when(Object command, Map<String,?> metaData)
          Dispatches the given command and meta data to the appropriate command handler and records all activity in the fixture for result validation.
 

Method Detail

when

ResultValidator when(Object command)
Dispatches the given command to the appropriate command handler and records all activity in the fixture for result validation. If the given command is a CommandMessage instance, it will be dispatched as-is. Any other object will cause the given command to be wrapped in a CommandMessage as its payload.

Parameters:
command - The command to execute
Returns:
a ResultValidator that can be used to validate the resulting actions of the command execution

when

ResultValidator when(Object command,
                     Map<String,?> metaData)
Dispatches the given command and meta data to the appropriate command handler and records all activity in the fixture for result validation. If the given command is a CommandMessage instance, it will be dispatched as-is, with given additional metaData. Any other object will cause the given command to be wrapped in a CommandMessage as its payload.

Parameters:
command - The command to execute
metaData - The meta data to attach to the
Returns:
a ResultValidator that can be used to validate the resulting actions of the command execution


Copyright © 2010-2016. All Rights Reserved.