org.springframework.test.context.junit4.statements
Class SpringRepeat
java.lang.Object
Statement
org.springframework.test.context.junit4.statements.SpringRepeat
public class SpringRepeat
- extends Statement
SpringRepeat
is a custom JUnit 4.5+ Statement
which adds
support for Spring's @Repeat
annotation by repeating the
test for the specified number of times.
- Since:
- 3.0
- Author:
- Sam Brannen
- See Also:
evaluate()
Constructor Summary |
SpringRepeat(Statement next,
java.lang.reflect.Method testMethod,
int repeat)
Constructs a new SpringRepeat statement. |
Method Summary |
void |
evaluate()
Invokes the next statement in the execution chain for
the specified repeat count. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final Log logger
next
private final Statement next
testMethod
private final java.lang.reflect.Method testMethod
repeat
private final int repeat
SpringRepeat
public SpringRepeat(Statement next,
java.lang.reflect.Method testMethod,
int repeat)
- Constructs a new
SpringRepeat
statement.
- Parameters:
next
- the next Statement
in the execution chaintestMethod
- the current test methodrepeat
- the configured repeat count for the current test method- See Also:
Repeat.value()
evaluate
public void evaluate()
throws java.lang.Throwable
- Invokes the next
statement
in the execution chain for
the specified repeat count.
- Throws:
java.lang.Throwable