Top Description Fields Constructors Methods
org.junit.platform.testkit.engine

public final Class Executions

extends Object
Class Inheritance
Annotations
@API
status:MAINTAINED
since:1.7
Static Imports
org.apiguardian.api.API.Status.MAINTAINED

Executions is a facade that provides a fluent API for working with executions.
Since
1.4

Field Summary

Modifier and TypeField and Description
private final String
private final List<Execution>

Constructor Summary

AccessConstructor and Description
private
Executions(Stream<Execution> executions, String category)

pack-priv
Executions(List<Event> events, String category)

Method Summary

Modifier and TypeMethod and Description
public Executions

Returns:

the filtered Executions; never null
aborted
()

Get the aborted Executions contained in this Executions object.

public ListAssert<Execution>

Returns:

an instance of ListAssert for executions; never null
assertThatExecutions
()

Shortcut for org.assertj.core.api.Assertions.assertThat(executions.list()).

public long
count()

Get the number of executions contained in this Executions object.

private static List<Execution>
createExecutions(List<Event> events)

Create executions from the supplied list of events.

public Executions

Returns:

this Executions object for method chaining; never null
debug
()

Print all executions to System#out.

public Executions

Returns:

this Executions object for method chaining; never null
debug
(OutputStream
the OutputStream to print to; never null
out
)

Print all executions to the supplied OutputStream.

public Executions

Returns:

this Executions object for method chaining; never null
debug
(Writer
the Writer to print to; never null
writer
)

Print all executions to the supplied Writer.

private Executions
debug(PrintWriter printWriter)

private Stream<Execution>
public Executions

Returns:

the filtered Executions; never null
failed
()

Get the failed Executions contained in this Executions object.

public Stream<Execution>

Returns:

the filtered stream of executions; never null
filter
(Predicate<? super Execution>
a Predicate to apply to each execution to decide if it should be included in the filtered stream; never null
predicate
)

Shortcut for executions.stream().filter(predicate).

public Executions

Returns:

the filtered Executions; never null
finished
()

Get the finished Executions contained in this Executions object.

private Stream<Execution>
private Stream<Execution>
public List<Execution>

Returns:

the list of executions; never null
list
()

Get the executions as a List.

public <R> Stream<R>

Returns:

the mapped stream of executions; never null
map
(Function<? super Execution, ? extends R>
a Function to apply to each execution; never null
mapper
)

Shortcut for executions.stream().map(mapper).

public Executions

Returns:

the filtered Executions; never null
skipped
()

Get the skipped Executions contained in this Executions object.

public Executions

Returns:

the filtered Executions; never null
started
()

Get the started Executions contained in this Executions object.

public Stream<Execution>

Returns:

the stream of executions; never null
stream
()

Get the executions as a Stream.

public Executions

Returns:

the filtered Executions; never null
succeeded
()

Get the succeeded Executions contained in this Executions object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

categoryback to summary
private final String category
executionsback to summary
private final List<Execution> executions

Constructor Detail

Executionsback to summary
private Executions(Stream<Execution> executions, String category)
Executionsback to summary
pack-priv Executions(List<Event> events, String category)

Method Detail

abortedback to summary
public Executions aborted()

Get the aborted Executions contained in this Executions object.

Returns:Executions

the filtered Executions; never null

assertThatExecutionsback to summary
public ListAssert<Execution> assertThatExecutions()

Shortcut for org.assertj.core.api.Assertions.assertThat(executions.list()).

Returns:ListAssert<Execution>

an instance of ListAssert for executions; never null

See Also
org.assertj.core.api.Assertions#assertThat(List), org.assertj.core.api.ListAssert
countback to summary
public long count()

Get the number of executions contained in this Executions object.

createExecutionsback to summary
private static List<Execution> createExecutions(List<Event> events)

Create executions from the supplied list of events.

debugback to summary
public Executions debug()

Print all executions to System#out.

Returns:Executions

this Executions object for method chaining; never null

debugback to summary
public Executions debug(OutputStream out)

Print all executions to the supplied OutputStream.

Parameters
out:OutputStream

the OutputStream to print to; never null

Returns:Executions

this Executions object for method chaining; never null

Annotations
@SuppressWarnings:DefaultCharset
debugback to summary
public Executions debug(Writer writer)

Print all executions to the supplied Writer.

Parameters
writer:Writer

the Writer to print to; never null

Returns:Executions

this Executions object for method chaining; never null

Annotations
@SuppressWarnings:DefaultCharset
debugback to summary
private Executions debug(PrintWriter printWriter)
executionsByTerminationInfoback to summary
private Stream<Execution> executionsByTerminationInfo(Predicate<TerminationInfo> predicate)
failedback to summary
public Executions failed()

Get the failed Executions contained in this Executions object.

Returns:Executions

the filtered Executions; never null

filterback to summary
public Stream<Execution> filter(Predicate<? super Execution> predicate)

Shortcut for executions.stream().filter(predicate).

Parameters
predicate:Predicate<? super Execution>

a Predicate to apply to each execution to decide if it should be included in the filtered stream; never null

Returns:Stream<Execution>

the filtered stream of executions; never null

See Also
stream(), Stream#filter(Predicate)
finishedback to summary
public Executions finished()

Get the finished Executions contained in this Executions object.

Returns:Executions

the filtered Executions; never null

finishedExecutionsback to summary
private Stream<Execution> finishedExecutions()
finishedExecutionsByStatusback to summary
private Stream<Execution> finishedExecutionsByStatus(TestExecutionResult.Status status)
listback to summary
public List<Execution> list()

Get the executions as a List.

Returns:List<Execution>

the list of executions; never null

See Also
stream()
mapback to summary
public <R> Stream<R> map(Function<? super Execution, ? extends R> mapper)

Shortcut for executions.stream().map(mapper).

Parameters
mapper:Function<? super Execution, ? extends R>

a Function to apply to each execution; never null

Returns:Stream<R>

the mapped stream of executions; never null

See Also
stream(), Stream#map(Function)
skippedback to summary
public Executions skipped()

Get the skipped Executions contained in this Executions object.

Returns:Executions

the filtered Executions; never null

startedback to summary
public Executions started()

Get the started Executions contained in this Executions object.

Returns:Executions

the filtered Executions; never null

streamback to summary
public Stream<Execution> stream()

Get the executions as a Stream.

Returns:Stream<Execution>

the stream of executions; never null

See Also
list()
succeededback to summary
public Executions succeeded()

Get the succeeded Executions contained in this Executions object.

Returns:Executions

the filtered Executions; never null