Class EventStatistics
- java.lang.Object
-
- org.junit.platform.testkit.engine.EventStatistics
-
@API(status=EXPERIMENTAL, since="1.4") public class EventStatistics extends Object
EventStatisticsprovides a fluent API for asserting statistics for events.EventStatisticsis used in conjunction withEvents.assertStatistics(java.util.function.Consumer)as in the following example.events.assertStatistics(stats -> stats.started(1).succeeded(1).failed(0));
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventStatisticsaborted(long expected)Specify the number of expected aborted events.EventStatisticsdynamicallyRegistered(long expected)Specify the number of expected dynamic registration events.EventStatisticsfailed(long expected)Specify the number of expected failed events.EventStatisticsfinished(long expected)Specify the number of expected finished events.EventStatisticsreportingEntryPublished(long expected)Specify the number of expected reporting entry publication events.EventStatisticsskipped(long expected)Specify the number of expected skipped events.EventStatisticsstarted(long expected)Specify the number of expected started events.EventStatisticssucceeded(long expected)Specify the number of expected succeeded events.
-
-
-
Method Detail
-
skipped
public EventStatistics skipped(long expected)
Specify the number of expected skipped events.- Parameters:
expected- the expected number of events- Returns:
- this
EventStatisticsfor method chaining
-
started
public EventStatistics started(long expected)
Specify the number of expected started events.- Parameters:
expected- the expected number of events- Returns:
- this
EventStatisticsfor method chaining
-
finished
public EventStatistics finished(long expected)
Specify the number of expected finished events.- Parameters:
expected- the expected number of events- Returns:
- this
EventStatisticsfor method chaining
-
aborted
public EventStatistics aborted(long expected)
Specify the number of expected aborted events.- Parameters:
expected- the expected number of events- Returns:
- this
EventStatisticsfor method chaining
-
succeeded
public EventStatistics succeeded(long expected)
Specify the number of expected succeeded events.- Parameters:
expected- the expected number of events- Returns:
- this
EventStatisticsfor method chaining
-
failed
public EventStatistics failed(long expected)
Specify the number of expected failed events.- Parameters:
expected- the expected number of events- Returns:
- this
EventStatisticsfor method chaining
-
reportingEntryPublished
public EventStatistics reportingEntryPublished(long expected)
Specify the number of expected reporting entry publication events.- Parameters:
expected- the expected number of events- Returns:
- this
EventStatisticsfor method chaining
-
dynamicallyRegistered
public EventStatistics dynamicallyRegistered(long expected)
Specify the number of expected dynamic registration events.- Parameters:
expected- the expected number of events- Returns:
- this
EventStatisticsfor method chaining
-
-