@API(status=MAINTAINED,
since="1.7")
public class EventStatistics
extends java.lang.Object
EventStatistics provides a fluent API for asserting statistics
for events.
EventStatistics is used in conjunction with
Events.assertStatistics(java.util.function.Consumer) as in the
following example.
events.assertStatistics(stats -> stats.started(1).succeeded(1).failed(0));
| Modifier and Type | Field and Description |
|---|---|
private Events |
events |
private java.util.List<Assertions.Executable> |
executables |
| Constructor and Description |
|---|
EventStatistics(Events events,
java.lang.String category) |
| Modifier and Type | Method and Description |
|---|---|
EventStatistics |
aborted(long expected)
Specify the number of expected aborted events.
|
(package private) void |
assertAll() |
EventStatistics |
dynamicallyRegistered(long expected)
Specify the number of expected dynamic registration events.
|
EventStatistics |
failed(long expected)
Specify the number of expected failed events.
|
EventStatistics |
finished(long expected)
Specify the number of expected finished events.
|
EventStatistics |
reportingEntryPublished(long expected)
Specify the number of expected reporting entry publication events.
|
EventStatistics |
skipped(long expected)
Specify the number of expected skipped events.
|
EventStatistics |
started(long expected)
Specify the number of expected started events.
|
EventStatistics |
succeeded(long expected)
Specify the number of expected succeeded events.
|
private final java.util.List<Assertions.Executable> executables
private final Events events
EventStatistics(Events events, java.lang.String category)
void assertAll()
public EventStatistics skipped(long expected)
expected - the expected number of eventsEventStatistics for method chainingpublic EventStatistics started(long expected)
expected - the expected number of eventsEventStatistics for method chainingpublic EventStatistics finished(long expected)
expected - the expected number of eventsEventStatistics for method chainingpublic EventStatistics aborted(long expected)
expected - the expected number of eventsEventStatistics for method chainingpublic EventStatistics succeeded(long expected)
expected - the expected number of eventsEventStatistics for method chainingpublic EventStatistics failed(long expected)
expected - the expected number of eventsEventStatistics for method chainingpublic EventStatistics reportingEntryPublished(long expected)
expected - the expected number of eventsEventStatistics for method chainingpublic EventStatistics dynamicallyRegistered(long expected)
expected - the expected number of eventsEventStatistics for method chaining