Class EventConditions
- java.lang.Object
-
- org.junit.platform.testkit.engine.EventConditions
-
@API(status=MAINTAINED, since="1.7") public final class EventConditions extends java.lang.ObjectCollection of AssertJ conditions forEvent.- Since:
- 1.4
- See Also:
TestExecutionResultConditions
-
-
Constructor Summary
Constructors Modifier Constructor Description privateEventConditions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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 newConditionthat matches if and only if anEvent's test descriptor is a container and its unique id contains the fully-qualified name of the suppliedClass.static org.assertj.core.api.Condition<Event>container(java.lang.String uniqueIdSubstring)Create a newConditionthat matches if and only if anEvent's test descriptor is a container and its unique id contains the suppliedString.static org.assertj.core.api.Condition<Event>container(org.assertj.core.api.Condition<Event> condition)Create a newConditionthat matches if and only if anEventmatches the suppliedConditionand its test descriptor is a container.static org.assertj.core.api.Condition<Event>displayName(java.lang.String displayName)Create a newConditionthat matches if and only if the display name of anEvent's test descriptor is equal to the suppliedString.static org.assertj.core.api.Condition<Event>dynamicTestRegistered(java.lang.String uniqueIdSubstring)Create a newConditionthat matches if and only if anEvent's type isEventType.DYNAMIC_TEST_REGISTEREDand its unique id contains the suppliedString.static org.assertj.core.api.Condition<Event>dynamicTestRegistered(org.assertj.core.api.Condition<Event> condition)Create a newConditionthat matches if and only if anEvent's type isEventType.DYNAMIC_TEST_REGISTEREDand it matches the suppliedCondition.static org.assertj.core.api.Condition<Event>engine()Create a newConditionthat matches if and only if anEvent's test descriptor is an instance ofEngineDescriptor.static org.assertj.core.api.Condition<Event>event(org.assertj.core.api.Condition<? super Event>... conditions)Create a newConditionthat matches if and only if anEventmatches all of the supplied conditions.static org.assertj.core.api.Condition<Event>finished(org.assertj.core.api.Condition<TestExecutionResult> resultCondition)Create a newConditionthat matches if and only if anEvent's type isEventType.FINISHEDand its payload is an instance ofTestExecutionResultthat matches the suppliedCondition.static org.assertj.core.api.Condition<Event>finishedSuccessfully()Create a newConditionthat matches if and only if anEvent's type isEventType.FINISHEDand its result has a status ofSUCCESSFUL.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()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 newConditionthat matches if and only if anEvent's test descriptor is a container and its unique id contains the simple names of the suppliedClassand all of its enclosing classes.static org.assertj.core.api.Condition<Event>reason(java.lang.String expectedReason)static org.assertj.core.api.Condition<Event>reason(java.util.function.Predicate<java.lang.String> predicate)static org.assertj.core.api.Condition<Event>reportEntry(java.util.Map<java.lang.String,java.lang.String> keyValuePairs)Create a newConditionthat matches if and only if anEvent's payload is an instance ofReportEntrythat contains the supplied key-value pairs.static org.assertj.core.api.Condition<Event>result(org.assertj.core.api.Condition<TestExecutionResult> condition)Create a newConditionthat matches if and only if anEvent's payload is an instance ofTestExecutionResultthat matches the suppliedCondition.static org.assertj.core.api.Condition<Event>skippedWithReason(java.lang.String expectedReason)Create a newConditionthat matches if and only if anEvent's type isEventType.SKIPPEDand the reason is equal to the suppliedString.static org.assertj.core.api.Condition<Event>skippedWithReason(java.util.function.Predicate<java.lang.String> predicate)Create a newConditionthat matches if and only if anEvent's type isEventType.SKIPPEDand the reason matches the suppliedPredicate.static org.assertj.core.api.Condition<Event>started()static org.assertj.core.api.Condition<Event>test()static org.assertj.core.api.Condition<Event>test(java.lang.String uniqueIdSubstring)Create a newConditionthat matches if and only if anEvent's test descriptor is a test and its unique id contains the suppliedString.static org.assertj.core.api.Condition<Event>test(java.lang.String uniqueIdSubstring, java.lang.String displayName)Create a newConditionthat matches if and only if anEvent's test descriptor is a test, its unique id contains the suppliedString, and its display name equals the suppliedString.static org.assertj.core.api.Condition<Event>type(EventType expectedType)static org.assertj.core.api.Condition<Event>uniqueIdSubstring(java.lang.String uniqueIdSubstring)Create a newConditionthat matches if and only if the unique id of anEvent's test descriptor contains the suppliedString.static org.assertj.core.api.Condition<Event>uniqueIdSubstrings(java.lang.String... uniqueIdSubstrings)Create a newConditionthat matches if and only if the unique id of anEvent's test descriptor contains all of the supplied strings.static org.assertj.core.api.Condition<Event>uniqueIdSubstrings(java.util.List<java.lang.String> uniqueIdSubstrings)Create a newConditionthat matches if and only if the unique id of anEvent's test descriptor contains all of the supplied strings.
-
-
-
Method Detail
-
event
@SafeVarargs public static org.assertj.core.api.Condition<Event> event(org.assertj.core.api.Condition<? super Event>... conditions)
Create a newConditionthat matches if and only if anEventmatches all of the supplied conditions.
-
engine
public static org.assertj.core.api.Condition<Event> engine()
Create a newConditionthat matches if and only if anEvent's test descriptor is an instance ofEngineDescriptor.
-
test
public static org.assertj.core.api.Condition<Event> test(java.lang.String uniqueIdSubstring)
Create a newConditionthat matches if and only if anEvent's test descriptor is a test and its unique id contains the suppliedString.- See Also:
test(),uniqueIdSubstring(String)
-
test
public static org.assertj.core.api.Condition<Event> test(java.lang.String uniqueIdSubstring, java.lang.String displayName)
Create a newConditionthat matches if and only if anEvent's test descriptor is a test, its unique id contains the suppliedString, and its display name equals the suppliedString.- See Also:
test(),uniqueIdSubstring(String),displayName(String)
-
test
public static org.assertj.core.api.Condition<Event> test()
-
container
public static org.assertj.core.api.Condition<Event> container(java.lang.Class<?> clazz)
Create a newConditionthat matches if and only if anEvent's test descriptor is a container and its unique id contains the fully-qualified name of the suppliedClass.
-
container
public static org.assertj.core.api.Condition<Event> container(java.lang.String uniqueIdSubstring)
Create a newConditionthat matches if and only if anEvent's test descriptor is a container and its unique id contains the suppliedString.
-
container
public static org.assertj.core.api.Condition<Event> container(org.assertj.core.api.Condition<Event> condition)
Create a newConditionthat matches if and only if anEventmatches the suppliedConditionand its test descriptor is a container.
-
container
public static org.assertj.core.api.Condition<Event> container()
-
nestedContainer
public static org.assertj.core.api.Condition<Event> nestedContainer(java.lang.Class<?> clazz)
Create a newConditionthat matches if and only if anEvent's test descriptor is a container and its unique id contains the simple names of the suppliedClassand 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).
-
dynamicTestRegistered
public static org.assertj.core.api.Condition<Event> dynamicTestRegistered(java.lang.String uniqueIdSubstring)
Create a newConditionthat matches if and only if anEvent's type isEventType.DYNAMIC_TEST_REGISTEREDand its unique id contains the suppliedString.
-
dynamicTestRegistered
public static org.assertj.core.api.Condition<Event> dynamicTestRegistered(org.assertj.core.api.Condition<Event> condition)
Create a newConditionthat matches if and only if anEvent's type isEventType.DYNAMIC_TEST_REGISTEREDand it matches the suppliedCondition.
-
uniqueIdSubstring
public static org.assertj.core.api.Condition<Event> uniqueIdSubstring(java.lang.String uniqueIdSubstring)
Create a newConditionthat matches if and only if the unique id of anEvent's test descriptor contains the suppliedString.
-
uniqueIdSubstrings
public static org.assertj.core.api.Condition<Event> uniqueIdSubstrings(java.lang.String... uniqueIdSubstrings)
Create a newConditionthat matches if and only if the unique id of anEvent's test descriptor contains all of the supplied strings.- Since:
- 1.6
-
uniqueIdSubstrings
public static org.assertj.core.api.Condition<Event> uniqueIdSubstrings(java.util.List<java.lang.String> uniqueIdSubstrings)
Create a newConditionthat matches if and only if the unique id of anEvent's test descriptor contains all of the supplied strings.- Since:
- 1.6
-
displayName
public static org.assertj.core.api.Condition<Event> displayName(java.lang.String displayName)
Create a newConditionthat matches if and only if the display name of anEvent's test descriptor is equal to the suppliedString.
-
skippedWithReason
public static org.assertj.core.api.Condition<Event> skippedWithReason(java.lang.String expectedReason)
Create a newConditionthat matches if and only if anEvent's type isEventType.SKIPPEDand the reason is equal to the suppliedString.- See Also:
reason(String)
-
skippedWithReason
public static org.assertj.core.api.Condition<Event> skippedWithReason(java.util.function.Predicate<java.lang.String> predicate)
Create a newConditionthat matches if and only if anEvent's type isEventType.SKIPPEDand the reason matches the suppliedPredicate.- See Also:
reason(Predicate)
-
started
public static org.assertj.core.api.Condition<Event> started()
-
abortedWithReason
@SafeVarargs public static org.assertj.core.api.Condition<Event> abortedWithReason(org.assertj.core.api.Condition<java.lang.Throwable>... conditions)
-
finishedWithFailure
@SafeVarargs public static org.assertj.core.api.Condition<Event> finishedWithFailure(org.assertj.core.api.Condition<java.lang.Throwable>... conditions)
-
finishedWithCause
private static org.assertj.core.api.Condition<Event> finishedWithCause(TestExecutionResult.Status expectedStatus, org.assertj.core.api.Condition<java.lang.Throwable>... conditions)
-
finishedWithFailure
public static org.assertj.core.api.Condition<Event> finishedWithFailure()
-
finishedSuccessfully
public static org.assertj.core.api.Condition<Event> finishedSuccessfully()
Create a newConditionthat matches if and only if anEvent's type isEventType.FINISHEDand its result has a status ofSUCCESSFUL.
-
finished
public static org.assertj.core.api.Condition<Event> finished(org.assertj.core.api.Condition<TestExecutionResult> resultCondition)
Create a newConditionthat matches if and only if anEvent's type isEventType.FINISHEDand its payload is an instance ofTestExecutionResultthat matches the suppliedCondition.
-
result
public static org.assertj.core.api.Condition<Event> result(org.assertj.core.api.Condition<TestExecutionResult> condition)
Create a newConditionthat matches if and only if anEvent's payload is an instance ofTestExecutionResultthat matches the suppliedCondition.
-
reason
public static org.assertj.core.api.Condition<Event> reason(java.lang.String expectedReason)
-
reason
public static org.assertj.core.api.Condition<Event> reason(java.util.function.Predicate<java.lang.String> predicate)
-
reportEntry
@API(status=EXPERIMENTAL, since="1.7") public static org.assertj.core.api.Condition<Event> reportEntry(java.util.Map<java.lang.String,java.lang.String> keyValuePairs)Create a newConditionthat matches if and only if anEvent's payload is an instance ofReportEntrythat contains the supplied key-value pairs.
-
-