@API(status=MAINTAINED,
since="1.7")
public final class EventConditions
extends java.lang.Object
Event.TestExecutionResultConditions| Modifier | Constructor and Description |
|---|---|
private |
EventConditions() |
| Modifier and Type | Method and Description |
|---|---|
static org.assertj.core.api.Condition<Event> |
abortedWithReason(org.assertj.core.api.Condition<java.lang.Throwable>... conditions)
|
static org.assertj.core.api.Condition<Event> |
container()
|
static org.assertj.core.api.Condition<Event> |
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> |
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> |
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> |
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> |
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> |
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> |
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> |
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. |
static org.assertj.core.api.Condition<Event> |
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. |
static org.assertj.core.api.Condition<Event> |
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> |
finishedWithCause(TestExecutionResult.Status expectedStatus,
org.assertj.core.api.Condition<java.lang.Throwable>... conditions) |
static org.assertj.core.api.Condition<Event> |
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> |
finishedWithFailure(org.assertj.core.api.Condition<java.lang.Throwable>... conditions)
|
static org.assertj.core.api.Condition<Event> |
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> |
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> |
reason(java.util.function.Predicate<java.lang.String> predicate)
|
static org.assertj.core.api.Condition<Event> |
reason(java.lang.String expectedReason)
|
static org.assertj.core.api.Condition<Event> |
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> |
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> |
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> |
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> |
started()
|
static org.assertj.core.api.Condition<Event> |
test()
|
static org.assertj.core.api.Condition<Event> |
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> |
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> |
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> |
type(EventType expectedType)
|
static org.assertj.core.api.Condition<Event> |
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> |
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> |
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. |
@SafeVarargs public static org.assertj.core.api.Condition<Event> event(org.assertj.core.api.Condition<? super Event>... conditions)
Condition that matches if and only if an
Event matches all of the supplied conditions.public static org.assertj.core.api.Condition<Event> engine()
Condition that matches if and only if an
Event's test descriptor is
an instance of EngineDescriptor.public static org.assertj.core.api.Condition<Event> test(java.lang.String uniqueIdSubstring)
Condition that matches if and only if an
Event's test descriptor is
a test and its
unique id contains the supplied
String.test(),
uniqueIdSubstring(String)public static org.assertj.core.api.Condition<Event> test(java.lang.String uniqueIdSubstring, java.lang.String displayName)
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.@API(status=MAINTAINED,
since="1.8")
public static org.assertj.core.api.Condition<Event> test(org.assertj.core.api.Condition<Event> condition)
Condition that matches if and only if an
Event matches the supplied Condition and its
test descriptor is a
test.
For example, test(displayName("my display name")) can be used
to match against a test with the given display name.
test(String),
test(String, String),
displayName(String)public static org.assertj.core.api.Condition<Event> test()
public static org.assertj.core.api.Condition<Event> container(java.lang.Class<?> clazz)
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.public static org.assertj.core.api.Condition<Event> container(java.lang.String uniqueIdSubstring)
Condition that matches if and only if an
Event's test descriptor is
a container and its
unique id contains the supplied
String.public static org.assertj.core.api.Condition<Event> container(org.assertj.core.api.Condition<Event> condition)
Condition that matches if and only if an
Event matches the supplied Condition and its
test descriptor is a
container.public static org.assertj.core.api.Condition<Event> container()
@API(status=MAINTAINED,
since="1.8")
public static org.assertj.core.api.Condition<Event> nestedContainer(java.lang.Class<?> clazz,
org.assertj.core.api.Condition<Event> condition)
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.
For example, nestedContainer(MyNestedTests.class, displayName("my display name"))
can be used to match against a nested container with the given display name.
Please note that this method does not differentiate between static nested classes and non-static member classes (e.g., inner classes).
nestedContainer(Class)public static org.assertj.core.api.Condition<Event> nestedContainer(java.lang.Class<?> clazz)
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.
Please note that this method does not differentiate between static nested classes and non-static member classes (e.g., inner classes).
nestedContainer(Class, Condition)public static org.assertj.core.api.Condition<Event> dynamicTestRegistered(java.lang.String uniqueIdSubstring)
Condition that matches if and only if an
Event's type is
EventType.DYNAMIC_TEST_REGISTERED and its
unique id contains the
supplied String.public static org.assertj.core.api.Condition<Event> dynamicTestRegistered(org.assertj.core.api.Condition<Event> condition)
Condition that matches if and only if an
Event's type is
EventType.DYNAMIC_TEST_REGISTERED and it matches the supplied
Condition.public static org.assertj.core.api.Condition<Event> uniqueIdSubstring(java.lang.String uniqueIdSubstring)
Condition that matches if and only if the
unique id of an
Event's test descriptor
contains the supplied String.public static org.assertj.core.api.Condition<Event> uniqueIdSubstrings(java.lang.String... uniqueIdSubstrings)
Condition that matches if and only if the
unique id of an
Event's test descriptor
contains all of the supplied strings.public static org.assertj.core.api.Condition<Event> uniqueIdSubstrings(java.util.List<java.lang.String> uniqueIdSubstrings)
Condition that matches if and only if the
unique id of an
Event's test descriptor
contains all of the supplied strings.public static org.assertj.core.api.Condition<Event> displayName(java.lang.String displayName)
Condition that matches if and only if the
display name of an
Event's test descriptor
is equal to the supplied String.public static org.assertj.core.api.Condition<Event> skippedWithReason(java.lang.String expectedReason)
Condition that matches if and only if an
Event's type is
EventType.SKIPPED and the
reason is equal to the supplied
String.reason(String)public static org.assertj.core.api.Condition<Event> skippedWithReason(java.util.function.Predicate<java.lang.String> predicate)
Condition that matches if and only if an
Event's type is
EventType.SKIPPED and the
reason matches the supplied
Predicate.reason(Predicate)public static org.assertj.core.api.Condition<Event> started()
@SafeVarargs public static org.assertj.core.api.Condition<Event> abortedWithReason(org.assertj.core.api.Condition<java.lang.Throwable>... conditions)
@SafeVarargs public static org.assertj.core.api.Condition<Event> finishedWithFailure(org.assertj.core.api.Condition<java.lang.Throwable>... conditions)
private static org.assertj.core.api.Condition<Event> finishedWithCause(TestExecutionResult.Status expectedStatus, org.assertj.core.api.Condition<java.lang.Throwable>... conditions)
public static org.assertj.core.api.Condition<Event> finishedWithFailure()
Condition that matches if and only if an
Event's type is
EventType.FINISHED and its
result has a
status of
FAILED.public static org.assertj.core.api.Condition<Event> finishedSuccessfully()
Condition that matches if and only if an
Event's type is
EventType.FINISHED and its
result has a
status of
SUCCESSFUL.public static org.assertj.core.api.Condition<Event> finished(org.assertj.core.api.Condition<TestExecutionResult> resultCondition)
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.public static org.assertj.core.api.Condition<Event> result(org.assertj.core.api.Condition<TestExecutionResult> condition)
Condition that matches if and only if an
Event's payload is an instance of
TestExecutionResult that matches the supplied Condition.public static org.assertj.core.api.Condition<Event> reason(java.lang.String expectedReason)
public static org.assertj.core.api.Condition<Event> reason(java.util.function.Predicate<java.lang.String> predicate)
@API(status=STABLE,
since="1.10")
public static org.assertj.core.api.Condition<Event> reportEntry(java.util.Map<java.lang.String,java.lang.String> keyValuePairs)
Condition that matches if and only if an
Event's payload is an instance of
ReportEntry that contains the supplied key-value pairs.