Package org.junit.jupiter.api
Interface RepetitionInfo
-
@API(status=STABLE, since="5.0") public interface RepetitionInfoRepetitionInfois used to inject information about the current repetition of a repeated test into@RepeatedTest,@BeforeEach, and@AfterEachmethods.If a method parameter is of type
RepetitionInfo, JUnit will supply an instance ofRepetitionInfocorresponding to the current repeated test as the value for the parameter.WARNING:
RepetitionInfocannot be injected into a@BeforeEachor@AfterEachmethod if the corresponding test method is not a@RepeatedTest. Any attempt to do so will result in aParameterResolutionException.- Since:
- 5.0
- See Also:
RepeatedTest,TestInfo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetCurrentRepetition()Get the current repetition of the corresponding@RepeatedTestmethod.intgetTotalRepetitions()Get the total number of repetitions of the corresponding@RepeatedTestmethod.
-
-
-
Method Detail
-
getCurrentRepetition
int getCurrentRepetition()
Get the current repetition of the corresponding@RepeatedTestmethod.
-
getTotalRepetitions
int getTotalRepetitions()
Get the total number of repetitions of the corresponding@RepeatedTestmethod.- See Also:
RepeatedTest.value()
-
-