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 protected
Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepeatStatement
build(Repeat annotation, org.junit.runners.model.Statement next)
Builds aRepeatStatement
instance using the values in this builder.RepeatStatement
build(org.junit.runners.model.Statement next)
Builds aRepeatStatement
instance using the values in this builder.protected int
getRepetitions()
protected boolean
isUntilFailure()
RepeatStatement.Builder
withRepetitions(int repetitions)
Specifies the number of times to run the test.RepeatStatement.Builder
withRunUntilFailure(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:
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 aRepeatStatement
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 givenStatement
.
-
build
public RepeatStatement build(Repeat annotation, org.junit.runners.model.Statement next)
Builds aRepeatStatement
instance using the values in this builder.- Parameters:
annotation
- TheRepeat
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 givenStatement
.
-
-