| Package | Description |
|---|---|
| org.junit.platform.testkit.engine |
Test Kit for testing the execution of a
TestEngine
running on the JUnit Platform. |
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<Event> |
Events.events |
private java.util.List<Event> |
ExecutionRecorder.events |
| Modifier and Type | Method and Description |
|---|---|
static Event |
Event.dynamicTestRegistered(TestDescriptor testDescriptor)
Create an
Event for the dynamic registration of the
supplied TestDescriptor. |
static Event |
Event.executionFinished(TestDescriptor testDescriptor,
TestExecutionResult result)
|
static Event |
Event.executionSkipped(TestDescriptor testDescriptor,
java.lang.String reason)
|
static Event |
Event.executionStarted(TestDescriptor testDescriptor)
Create a started
Event for the supplied
TestDescriptor. |
private static Event |
Events.findEvent(java.util.List<Event> events,
org.assertj.core.api.SoftAssertions softly,
org.assertj.core.api.Condition<? super Event> condition) |
static Event |
Event.reportingEntryPublished(TestDescriptor testDescriptor,
ReportEntry entry)
|
| Modifier and Type | Method and Description |
|---|---|
static org.assertj.core.api.Condition<Event> |
EventConditions.abortedWithReason(org.assertj.core.api.Condition<java.lang.Throwable>... conditions)
|
org.assertj.core.api.ListAssert<Event> |
Events.assertThatEvents()
Shortcut for
org.assertj.core.api.Assertions.assertThat(events.list()). |
static <T> java.util.function.Predicate<Event> |
Event.byPayload(java.lang.Class<T> payloadType,
java.util.function.Predicate<? super T> payloadPredicate)
Create a
Predicate for events whose payload
types match the supplied payloadType and whose payloads match the
supplied payloadPredicate. |
static java.util.function.Predicate<Event> |
Event.byTestDescriptor(java.util.function.Predicate<? super TestDescriptor> testDescriptorPredicate)
|
static java.util.function.Predicate<Event> |
Event.byType(EventType type)
|
static org.assertj.core.api.Condition<Event> |
EventConditions.container()
|
static org.assertj.core.api.Condition<Event> |
EventConditions.container(java.lang.Class<?> clazz)
Create a new
Condition that matches if and only if an
Event's test descriptor is
a container and its
unique id contains the
fully-qualified name of the supplied Class. |
static org.assertj.core.api.Condition<Event> |
EventConditions.container(org.assertj.core.api.Condition<Event> condition)
Create a new
Condition that matches if and only if an
Event matches the supplied Condition and its
test descriptor is a
container. |
static org.assertj.core.api.Condition<Event> |
EventConditions.container(java.lang.String uniqueIdSubstring)
Create a new
Condition that matches if and only if an
Event's test descriptor is
a container and its
unique id contains the supplied
String. |
static org.assertj.core.api.Condition<Event> |
EventConditions.displayName(java.lang.String displayName)
Create a new
Condition that matches if and only if the
display name of an
Event's test descriptor
is equal to the supplied String. |
static org.assertj.core.api.Condition<Event> |
EventConditions.dynamicTestRegistered(org.assertj.core.api.Condition<Event> condition)
Create a new
Condition that matches if and only if an
Event's type is
EventType.DYNAMIC_TEST_REGISTERED and it matches the supplied
Condition. |
static org.assertj.core.api.Condition<Event> |
EventConditions.dynamicTestRegistered(java.lang.String uniqueIdSubstring)
Create a new
Condition that matches if and only if an
Event's type is
EventType.DYNAMIC_TEST_REGISTERED and its
unique id contains the
supplied String. |
static org.assertj.core.api.Condition<Event> |
EventConditions.engine()
Create a new
Condition that matches if and only if an
Event's test descriptor is
an instance of EngineDescriptor. |
static org.assertj.core.api.Condition<Event> |
EventConditions.event(org.assertj.core.api.Condition<? super Event>... conditions)
Create a new
Condition that matches if and only if an
Event matches all of the supplied conditions. |
private java.util.stream.Stream<Event> |
Events.eventsByType(EventType type) |
java.util.stream.Stream<Event> |
Events.filter(java.util.function.Predicate<? super Event> predicate)
Shortcut for
events.stream().filter(predicate). |
private static java.util.stream.Stream<Event> |
EngineExecutionResults.filterEvents(java.util.List<Event> events,
java.util.function.Predicate<? super TestDescriptor> predicate)
Filter the supplied list of events using the supplied predicate.
|
static org.assertj.core.api.Condition<Event> |
EventConditions.finished(org.assertj.core.api.Condition<TestExecutionResult> resultCondition)
Create a new
Condition that matches if and only if an
Event's type is
EventType.FINISHED and its
payload is an instance of
TestExecutionResult that matches the supplied Condition. |
private java.util.stream.Stream<Event> |
Events.finishedEventsByStatus(TestExecutionResult.Status status) |
static org.assertj.core.api.Condition<Event> |
EventConditions.finishedSuccessfully()
Create a new
Condition that matches if and only if an
Event's type is
EventType.FINISHED and its
result has a
status of
SUCCESSFUL. |
private static org.assertj.core.api.Condition<Event> |
EventConditions.finishedWithCause(TestExecutionResult.Status expectedStatus,
org.assertj.core.api.Condition<java.lang.Throwable>... conditions) |
static org.assertj.core.api.Condition<Event> |
EventConditions.finishedWithFailure()
Create a new
Condition that matches if and only if an
Event's type is
EventType.FINISHED and its
result has a
status of
FAILED. |
static org.assertj.core.api.Condition<Event> |
EventConditions.finishedWithFailure(org.assertj.core.api.Condition<java.lang.Throwable>... conditions)
|
java.util.List<Event> |
Events.list()
Get the events as a
List. |
static org.assertj.core.api.Condition<Event> |
EventConditions.nestedContainer(java.lang.Class<?> clazz)
Create a new
Condition that matches if and only if an
Event's test descriptor is
a container and its
unique id contains the
simple names of the supplied Class and all of its
enclosing classes. |
static org.assertj.core.api.Condition<Event> |
EventConditions.nestedContainer(java.lang.Class<?> clazz,
org.assertj.core.api.Condition<Event> condition)
Create a new
Condition that matches if and only if an
Event matches the supplied Condition, its
test descriptor is
a container, and its
unique id contains the
simple names of the supplied Class and all of its
enclosing classes. |
static org.assertj.core.api.Condition<Event> |
EventConditions.reason(java.util.function.Predicate<java.lang.String> predicate)
|
static org.assertj.core.api.Condition<Event> |
EventConditions.reason(java.lang.String expectedReason)
|
static org.assertj.core.api.Condition<Event> |
EventConditions.reportEntry(java.util.Map<java.lang.String,java.lang.String> keyValuePairs)
Create a new
Condition that matches if and only if an
Event's payload is an instance of
ReportEntry that contains the supplied key-value pairs. |
static org.assertj.core.api.Condition<Event> |
EventConditions.result(org.assertj.core.api.Condition<TestExecutionResult> condition)
Create a new
Condition that matches if and only if an
Event's payload is an instance of
TestExecutionResult that matches the supplied Condition. |
static org.assertj.core.api.Condition<Event> |
EventConditions.skippedWithReason(java.util.function.Predicate<java.lang.String> predicate)
Create a new
Condition that matches if and only if an
Event's type is
EventType.SKIPPED and the
reason matches the supplied
Predicate. |
static org.assertj.core.api.Condition<Event> |
EventConditions.skippedWithReason(java.lang.String expectedReason)
Create a new
Condition that matches if and only if an
Event's type is
EventType.SKIPPED and the
reason is equal to the supplied
String. |
static org.assertj.core.api.Condition<Event> |
EventConditions.started()
|
java.util.stream.Stream<Event> |
Events.stream()
Get the events as a
Stream. |
static org.assertj.core.api.Condition<Event> |
EventConditions.test()
|
static org.assertj.core.api.Condition<Event> |
EventConditions.test(org.assertj.core.api.Condition<Event> condition)
Create a new
Condition that matches if and only if an
Event matches the supplied Condition and its
test descriptor is a
test. |
static org.assertj.core.api.Condition<Event> |
EventConditions.test(java.lang.String uniqueIdSubstring)
Create a new
Condition that matches if and only if an
Event's test descriptor is
a test and its
unique id contains the supplied
String. |
static org.assertj.core.api.Condition<Event> |
EventConditions.test(java.lang.String uniqueIdSubstring,
java.lang.String displayName)
Create a new
Condition that matches if and only if an
Event's test descriptor is
a test, its
unique id contains the supplied
String, and its display name equals the supplied String. |
static org.assertj.core.api.Condition<Event> |
EventConditions.type(EventType expectedType)
|
static org.assertj.core.api.Condition<Event> |
EventConditions.uniqueIdSubstring(java.lang.String uniqueIdSubstring)
Create a new
Condition that matches if and only if the
unique id of an
Event's test descriptor
contains the supplied String. |
static org.assertj.core.api.Condition<Event> |
EventConditions.uniqueIdSubstrings(java.util.List<java.lang.String> uniqueIdSubstrings)
Create a new
Condition that matches if and only if the
unique id of an
Event's test descriptor
contains all of the supplied strings. |
static org.assertj.core.api.Condition<Event> |
EventConditions.uniqueIdSubstrings(java.lang.String... uniqueIdSubstrings)
Create a new
Condition that matches if and only if the
unique id of an
Event's test descriptor
contains all of the supplied strings. |
| Modifier and Type | Method and Description |
|---|---|
private static void |
Events.assertEventsMatchExactly(java.util.List<Event> events,
org.assertj.core.api.Condition<? super Event>... conditions) |
private static void |
Events.assertEventsMatchLoosely(java.util.List<Event> events,
org.assertj.core.api.Condition<? super Event>... conditions) |
private static void |
Events.assertEventsMatchLooselyInOrder(java.util.List<Event> events,
org.assertj.core.api.Condition<? super Event>... conditions) |
private static void |
Events.checkCondition(java.util.List<Event> events,
org.assertj.core.api.SoftAssertions softly,
org.assertj.core.api.Condition<? super Event> condition) |
private static void |
Events.checkCondition(java.util.List<Event> events,
org.assertj.core.api.SoftAssertions softly,
org.assertj.core.api.Condition<? super Event> condition) |
static org.assertj.core.api.Condition<Event> |
EventConditions.container(org.assertj.core.api.Condition<Event> condition)
Create a new
Condition that matches if and only if an
Event matches the supplied Condition and its
test descriptor is a
container. |
private static java.util.List<Execution> |
Executions.createExecutions(java.util.List<Event> events)
Create executions from the supplied list of events.
|
static org.assertj.core.api.Condition<Event> |
EventConditions.dynamicTestRegistered(org.assertj.core.api.Condition<Event> condition)
Create a new
Condition that matches if and only if an
Event's type is
EventType.DYNAMIC_TEST_REGISTERED and it matches the supplied
Condition. |
java.util.stream.Stream<Event> |
Events.filter(java.util.function.Predicate<? super Event> predicate)
Shortcut for
events.stream().filter(predicate). |
private static java.util.stream.Stream<Event> |
EngineExecutionResults.filterEvents(java.util.List<Event> events,
java.util.function.Predicate<? super TestDescriptor> predicate)
Filter the supplied list of events using the supplied predicate.
|
private static Event |
Events.findEvent(java.util.List<Event> events,
org.assertj.core.api.SoftAssertions softly,
org.assertj.core.api.Condition<? super Event> condition) |
private static Event |
Events.findEvent(java.util.List<Event> events,
org.assertj.core.api.SoftAssertions softly,
org.assertj.core.api.Condition<? super Event> condition) |
<R> java.util.stream.Stream<R> |
Events.map(java.util.function.Function<? super Event,? extends R> mapper)
Shortcut for
events.stream().map(mapper). |
static org.assertj.core.api.Condition<Event> |
EventConditions.nestedContainer(java.lang.Class<?> clazz,
org.assertj.core.api.Condition<Event> condition)
Create a new
Condition that matches if and only if an
Event matches the supplied Condition, its
test descriptor is
a container, and its
unique id contains the
simple names of the supplied Class and all of its
enclosing classes. |
static org.assertj.core.api.Condition<Event> |
EventConditions.test(org.assertj.core.api.Condition<Event> condition)
Create a new
Condition that matches if and only if an
Event matches the supplied Condition and its
test descriptor is a
test. |
| Constructor and Description |
|---|
EngineExecutionResults(java.util.List<Event> events)
Construct
EngineExecutionResults from the supplied list of recorded
events. |
Events(java.util.List<Event> events,
java.lang.String category) |
Events(java.util.stream.Stream<Event> events,
java.lang.String category) |
Executions(java.util.List<Event> events,
java.lang.String category) |