Class SpringRepeat
- java.lang.Object
- org.junit.runners.model.Statement
- org.springframework.test.context.junit4.statements.SpringRepeat
public class SpringRepeat extends Statement
SpringRepeat
is a custom JUnitStatement
which adds support for Spring's@Repeat
annotation by repeating the test the specified number of times.- Since:
- 3.0
- Author:
- Sam Brannen
- See Also:
evaluate()
Constructor Summary
Constructors Constructor Description SpringRepeat(Statement next, Method testMethod)
Construct a newSpringRepeat
statement for the suppliedtestMethod
, retrieving the configured repeat count from the@Repeat
annotation on the supplied method.SpringRepeat(Statement next, Method testMethod, int repeat)
Construct a newSpringRepeat
statement for the suppliedtestMethod
andrepeat
count.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
evaluate()
Evaluate the nextstatement
in the execution chain repeatedly, using the specified repeat count.
Constructor Detail
SpringRepeat
public SpringRepeat(Statement next, Method testMethod)
Construct a newSpringRepeat
statement for the suppliedtestMethod
, retrieving the configured repeat count from the@Repeat
annotation on the supplied method.- Parameters:
next
- the nextStatement
in the execution chaintestMethod
- the current test method- See Also:
TestAnnotationUtils.getRepeatCount(Method)
SpringRepeat
public SpringRepeat(Statement next, Method testMethod, int repeat)
Construct a newSpringRepeat
statement for the suppliedtestMethod
andrepeat
count.- Parameters:
next
- the nextStatement
in the execution chaintestMethod
- the current test methodrepeat
- the configured repeat count for the current test method