public class CommandValidator extends Object
| Constructor and Description | 
|---|
CommandValidator(RecordingCommandBus commandBus,
                FieldFilter fieldFilter)
Creates a validator which monitors the given  
commandBus. | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
assertDispatchedEqualTo(Object... expected)
Assert that the given commands have been dispatched in the exact sequence provided. 
 | 
void | 
assertDispatchedMatching(org.hamcrest.Matcher<?> matcher)
Assert that commands matching the given  
matcher has been dispatched on the command bus. | 
void | 
startRecording()
Starts recording commands on the command bus. 
 | 
public CommandValidator(RecordingCommandBus commandBus, FieldFilter fieldFilter)
commandBus.commandBus - the command bus to monitorfieldFilter - the filter describing the Fields to include in a comparisonpublic void startRecording()
public void assertDispatchedEqualTo(Object... expected)
expected - The commands expected to have been published on the buspublic void assertDispatchedMatching(org.hamcrest.Matcher<?> matcher)
matcher has been dispatched on the command bus.matcher - The matcher validating the actual commandsCopyright © 2010–2018. All rights reserved.