Class Executions
- java.lang.Object
-
- org.junit.platform.testkit.engine.Executions
-
@API(status=EXPERIMENTAL, since="1.4") public final class Executions extends Object
Executionsis a facade that provides a fluent API for working with executions.- Since:
- 1.4
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Executionsaborted()Get the abortedExecutionscontained in thisExecutionsobject.ListAssert<Execution>assertThatExecutions()Shortcut fororg.assertj.core.api.Assertions.assertThat(executions.list()).longcount()Get the number of executions contained in thisExecutionsobject.Executionsdebug()Print all executions toSystem.out.Executionsdebug(OutputStream out)Print all executions to the suppliedOutputStream.Executionsdebug(Writer writer)Print all executions to the suppliedWriter.Executionsfailed()Get the failedExecutionscontained in thisExecutionsobject.Stream<Execution>filter(Predicate<? super Execution> predicate)Shortcut forexecutions.stream().filter(predicate).Executionsfinished()Get the finishedExecutionscontained in thisExecutionsobject.List<Execution>list()Get the executions as aList.<R> Stream<R>map(Function<? super Execution,? extends R> mapper)Shortcut forexecutions.stream().map(mapper).Executionsskipped()Get the skippedExecutionscontained in thisExecutionsobject.Executionsstarted()Get the startedExecutionscontained in thisExecutionsobject.Stream<Execution>stream()Get the executions as aStream.Executionssucceeded()Get the succeededExecutionscontained in thisExecutionsobject.
-
-
-
Method Detail
-
list
public List<Execution> list()
Get the executions as aList.- Returns:
- the list of executions; never
null - See Also:
stream()
-
stream
public Stream<Execution> stream()
Get the executions as aStream.- Returns:
- the stream of executions; never
null - See Also:
list()
-
map
public <R> Stream<R> map(Function<? super Execution,? extends R> mapper)
Shortcut forexecutions.stream().map(mapper).- Parameters:
mapper- aFunctionto apply to each execution; nevernull- Returns:
- the mapped stream of executions; never
null - See Also:
stream(),Stream.map(Function)
-
filter
public Stream<Execution> filter(Predicate<? super Execution> predicate)
Shortcut forexecutions.stream().filter(predicate).- Parameters:
predicate- aPredicateto apply to each execution to decide if it should be included in the filtered stream; nevernull- Returns:
- the filtered stream of executions; never
null - See Also:
stream(),Stream.filter(Predicate)
-
count
public long count()
Get the number of executions contained in thisExecutionsobject.
-
skipped
public Executions skipped()
Get the skippedExecutionscontained in thisExecutionsobject.- Returns:
- the filtered
Executions; nevernull
-
started
public Executions started()
Get the startedExecutionscontained in thisExecutionsobject.- Returns:
- the filtered
Executions; nevernull
-
finished
public Executions finished()
Get the finishedExecutionscontained in thisExecutionsobject.- Returns:
- the filtered
Executions; nevernull
-
aborted
public Executions aborted()
Get the abortedExecutionscontained in thisExecutionsobject.- Returns:
- the filtered
Executions; nevernull
-
succeeded
public Executions succeeded()
Get the succeededExecutionscontained in thisExecutionsobject.- Returns:
- the filtered
Executions; nevernull
-
failed
public Executions failed()
Get the failedExecutionscontained in thisExecutionsobject.- Returns:
- the filtered
Executions; nevernull
-
assertThatExecutions
public ListAssert<Execution> assertThatExecutions()
Shortcut fororg.assertj.core.api.Assertions.assertThat(executions.list()).- Returns:
- an instance of
ListAssertfor executions; nevernull - See Also:
Assertions.assertThat(List),ListAssert
-
debug
public Executions debug()
Print all executions toSystem.out.- Returns:
- this
Executionsobject for method chaining; nevernull
-
debug
public Executions debug(OutputStream out)
Print all executions to the suppliedOutputStream.- Parameters:
out- theOutputStreamto print to; nevernull- Returns:
- this
Executionsobject for method chaining; nevernull
-
debug
public Executions debug(Writer writer)
Print all executions to the suppliedWriter.- Parameters:
writer- theWriterto print to; nevernull- Returns:
- this
Executionsobject for method chaining; nevernull
-
-