Package org.apache.activemq.junit
Class RepeatStatement.Builder
- java.lang.Object
-
- org.apache.activemq.junit.RepeatStatement.Builder
-
- Enclosing class:
- RepeatStatement
public static class RepeatStatement.Builder extends Object
Builder forRepeat.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepeatStatementbuild(Repeat annotation, org.junit.runners.model.Statement next)Builds aRepeatStatementinstance using the values in this builder.RepeatStatementbuild(org.junit.runners.model.Statement next)Builds aRepeatStatementinstance using the values in this builder.protected intgetRepetitions()protected booleanisUntilFailure()RepeatStatement.BuilderwithRepetitions(int repetitions)Specifies the number of times to run the test.RepeatStatement.BuilderwithRunUntilFailure(boolean untilFailure)Specifies the number of times to run the test.
-
-
-
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:
thisfor 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:
thisfor method chaining.
-
getRepetitions
protected int getRepetitions()
-
isUntilFailure
protected boolean isUntilFailure()
-
build
public RepeatStatement build(org.junit.runners.model.Statement next)
Builds aRepeatStatementinstance using the values in this builder.- Parameters:
next- The statement instance to wrap with the newly create repeat statement.- Returns:
- a new
RepeatStatementthat wraps the givenStatement.
-
build
public RepeatStatement build(Repeat annotation, org.junit.runners.model.Statement next)
Builds aRepeatStatementinstance using the values in this builder.- Parameters:
annotation- TheRepeatannotation that triggered this statement being created.next- The statement instance to wrap with the newly create repeat statement.- Returns:
- a new
RepeatStatementthat wraps the givenStatement.
-
-