Class RepeatStatement.Builder

java.lang.Object
org.apache.activemq.junit.RepeatStatement.Builder
Enclosing class:
RepeatStatement

public static class RepeatStatement.Builder extends Object
Builder for Repeat.
  • Constructor Details

    • Builder

      protected Builder()
  • Method Details

    • withRepetitions

      public RepeatStatement.Builder withRepetitions(int repetitions)
      Specifies the number of times to run the test.
      Parameters:
      repetitions - The number of times to run the test.
      Returns:
      this for method chaining.
    • withRunUntilFailure

      public RepeatStatement.Builder withRunUntilFailure(boolean untilFailure)
      Specifies the number of times to run the test.
      Parameters:
      untilFailure - true if the test should run until a failure occurs.
      Returns:
      this for method chaining.
    • getRepetitions

      protected int getRepetitions()
    • isUntilFailure

      protected boolean isUntilFailure()
    • build

      public RepeatStatement build(Statement next)
      Builds a RepeatStatement instance using the values in this builder.
      Parameters:
      next - The statement instance to wrap with the newly create repeat statement.
      Returns:
      a new RepeatStatement that wraps the given Statement.
    • build

      public RepeatStatement build(Repeat annotation, Statement next)
      Builds a RepeatStatement instance using the values in this builder.
      Parameters:
      annotation - The Repeat annotation that triggered this statement being created.
      next - The statement instance to wrap with the newly create repeat statement.
      Returns:
      a new RepeatStatement that wraps the given Statement.