when

fun <S : Any> GivenStage<S>.when(command: Any, header: Header = DefaultHeader.empty(), ownerId: String = OwnerId.DEFAULT_OWNER_ID): ExpectStage<S>

Alias for whenCommand, providing a more natural language interface.

This method is equivalent to whenCommand but uses the keyword 'when' which reads more naturally in test specifications.

Return

an ExpectStage for defining expectations

Parameters

command

the command to execute

header

optional command header (defaults to empty)

ownerId

optional owner ID override (defaults to previously set owner)