Enclosing class:
Then<SELF extends Then<SELF,ACTION>,ACTION extends GivenWhen<ACTION,SELF>>

public static final class Then.Phase extends Then<Then.Phase,GivenWhen.Phase>
Default implementation of the Then.
  • Field Details

  • Constructor Details

    • Phase

      public Phase()
  • Method Details

    • initialize

      protected void initialize(WorkflowTestFixture<?,?> fixture, WorkflowTestDriver testDriver)
      Initializes this phase with the owning fixture and the shared test driver.

      The fixture calls this during construction so both phases operate on the same underlying workflow runtime and testing state.

      Parameters:
      fixture - owning workflow test fixture
      testDriver - shared workflow test driver
    • executionExists

      public Then.Phase executionExists()
      Waits until any active workflow execution exists.
      Returns:
      this phase for fluent chaining
    • executionExists

      public Then.Phase executionExists(Predicate<WorkflowExecution> predicate)
      Waits until an active workflow execution matching the predicate exists.

      If exactly one execution matches, it becomes the selected execution for subsequent assertions.

      Parameters:
      predicate - predicate used to select matching executions
      Returns:
      this phase for fluent chaining
    • historyExists

      public Then.Phase historyExists(Predicate<WorkflowHistory> predicate)
      Waits until a workflow history matching the predicate exists.

      If exactly one history matches, it becomes the selected history for subsequent assertions.

      Parameters:
      predicate - predicate used to select matching histories
      Returns:
      this phase for fluent chaining
    • historyExists

      public Then.Phase historyExists(String workflowId)
      Waits until a workflow history exists for the given workflow id.
      Parameters:
      workflowId - workflow id to find
      Returns:
      this phase for fluent chaining
    • historyExists

      public Then.Phase historyExists(WorkflowStatus workflowStatus)
      Waits until at least one workflow history exists and has the given status.
      Parameters:
      workflowStatus - expected workflow status
      Returns:
      this phase for fluent chaining
    • noExecution

      public Then.Phase noExecution()
      Asserts that no active workflow execution is present.
      Returns:
      this phase for fluent chaining
    • noHistory

      public Then.Phase noHistory()
      Asserts that no workflow history is recorded.
      Returns:
      this phase for fluent chaining
    • stop

      public void stop()
      Shuts down the test driver and all services.