abstract static class Repeater.BaseRepeatStatement extends org.junit.runners.model.Statement
| Modifier and Type | Field and Description |
|---|---|
private org.junit.runners.model.Statement |
base
Statement to repeat.
|
private static double |
HUNDRED_PERCENT
Used for error rate calculation.
|
private int |
times
how many times to repeat.
|
| Constructor and Description |
|---|
BaseRepeatStatement(int times,
org.junit.runners.model.Statement base)
Dedicated constructor.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
assertNoErrors(Collection<? extends Throwable> errors)
Assert that there are no errors during all repetitions.
|
(package private) org.junit.runners.model.Statement |
base()
The multiple times executed base statement.
|
(package private) static double |
calculateFailedRepetitionPercentage(int times,
int errors)
Calculates percentage of errors.
|
(package private) static String |
formatErrors(Collection<? extends Throwable> errors,
int times)
Formats the given errors into one message.
|
(package private) int |
times()
How many times to execute the base statement.
|
evaluateprivate static final double HUNDRED_PERCENT
private final int times
private final org.junit.runners.model.Statement base
BaseRepeatStatement(int times,
org.junit.runners.model.Statement base)
times - must be greater than 0base - must not be nullint times()
org.junit.runners.model.Statement base()
nullvoid assertNoErrors(Collection<? extends Throwable> errors)
Throws an AssertionError if list of errors is not empty.
errors - must not be nullstatic String formatErrors(Collection<? extends Throwable> errors, int times)
The message contains one headline with number of repetitions and number of errors. This is followed by the stack trace of each error.
errors - must not be nulltimes - must be greater than 0nullstatic double calculateFailedRepetitionPercentage(int times,
int errors)
times - must not be less than 1errors - must not be less than 0Copyright © 2014 Sven Strittmatter. All Rights Reserved.