Class StateMachineTestPlanBuilder<S,E>

java.lang.Object
org.springframework.statemachine.test.StateMachineTestPlanBuilder<S,E>
Type Parameters:
S - the type of state
E - the type of event

public class StateMachineTestPlanBuilder<S,E> extends Object
A builder for StateMachineTestPlan.
  • Constructor Details

    • StateMachineTestPlanBuilder

      public StateMachineTestPlanBuilder()
  • Method Details

    • builder

      public static <S, E> StateMachineTestPlanBuilder<S,E> builder()
      Gets a new instance of this builder.
      Type Parameters:
      S - the type of state
      E - the type of event
      Returns:
      the state machine test plan builder
    • stateMachine

      public StateMachineTestPlanBuilder<S,E> stateMachine(StateMachine<S,E> stateMachine)
      Associate a state machine with this builder.
      Parameters:
      stateMachine - the state machine
      Returns:
      the state machine test plan builder
    • stateMachine

      public StateMachineTestPlanBuilder<S,E> stateMachine(StateMachine<S,E> stateMachine, Object machineId)
      Associate a state machine with this builder.
      Parameters:
      stateMachine - the state machine
      machineId - the machine id to use for sending
      Returns:
      the state machine test plan builder
    • defaultAwaitTime

      public StateMachineTestPlanBuilder<S,E> defaultAwaitTime(int seconds)
      Sets default await time. This is in seconds how long a latch will be waited for listening various callbacks.
      Parameters:
      seconds - the default await time in seconds
      Returns:
      the state machine test plan builder
    • step

      Gets a new step builder.
      Returns:
      the state machine test plan step builder
    • build

      public StateMachineTestPlan<S,E> build()
      Builds the state machine test plan.
      Returns:
      the state machine test plan