Class RepeatStatement.Builder

    • Constructor Detail

      • Builder

        protected Builder()
    • Method Detail

      • 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​(org.junit.runners.model.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,
                                     org.junit.runners.model.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.