Interface GivenDsl.Initial<C extends Command>

Type Parameters:
C - the generic command type
All Superinterfaces:
GivenDsl<C>
Enclosing interface:
GivenDsl<C extends Command>

public static interface GivenDsl.Initial<C extends Command> extends GivenDsl<C>
Entry point for the Given phase, returned by CommandHandlingTestFixture.given(). Extends GivenDsl with the additional option to declare that no preconditions exist via nothing().

After calling nothing(), only GivenDsl.Terminated.when(Command) is available, preventing nonsensical chains like .event(...).nothing() or .nothing().nothing().

  • Method Details

    • nothing

      Indicates that no preconditions exist for this test. The command will be executed against an empty/null state. This is typically used for commands that create new instances.
      Returns:
      a GivenDsl.Terminated interface that only allows transitioning to command execution