Top Description Fields Constructors Methods
org.junit.jupiter.api

public Class DynamicContainer

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

A DynamicContainer is a container generated at runtime.

It is composed of a display name and an Iterable or Stream of DynamicNodes.

Instances of DynamicContainer must be generated by factory methods annotated with @TestFactory.

Since
5.0
See Also
dynamicContainer(String, Iterable), dynamicContainer(String, Stream), TestFactory, DynamicTest

Field Summary

Modifier and TypeField and Description
private final Stream<? extends DynamicNode>

Constructor Summary

AccessConstructor and Description
private
DynamicContainer(String displayName, @Nullable URI testSourceUri, Stream<? extends DynamicNode> children)

Method Summary

Modifier and TypeMethod and Description
public static DynamicContainer
dynamicContainer(String
the display name for the dynamic container; never null or blank
displayName
,
Iterable<? extends DynamicNode>
collection of dynamic nodes to execute; never null
dynamicNodes
)

Factory for creating a new DynamicContainer for the supplied display name and collection of dynamic nodes.

public static DynamicContainer
dynamicContainer(String
the display name for the dynamic container; never null or blank
displayName
,
Stream<? extends DynamicNode>
stream of dynamic nodes to execute; never null
dynamicNodes
)

Factory for creating a new DynamicContainer for the supplied display name and stream of dynamic nodes.

public static DynamicContainer
dynamicContainer(String
the display name for the dynamic container; never null or blank
displayName
,
@Nullable URI
a custom test source URI for the dynamic container; may be null if the framework should generate the test source based on the @TestFactory method
testSourceUri
,
Stream<? extends DynamicNode>
stream of dynamic nodes to execute; never null
dynamicNodes
)

Factory for creating a new DynamicContainer for the supplied display name, custom test source URI, and stream of dynamic nodes.

public Stream<? extends DynamicNode>
getChildren()

Get the Stream of DynamicNodes associated with this DynamicContainer.

Inherited from org.junit.jupiter.api.DynamicNode:
getDisplayNamegetTestSourceUritoString

Field Detail

childrenback to summary
private final Stream<? extends DynamicNode> children

Constructor Detail

DynamicContainerback to summary
private DynamicContainer(String displayName, @Nullable URI testSourceUri, Stream<? extends DynamicNode> children)

Method Detail

dynamicContainerback to summary
public static DynamicContainer dynamicContainer(String displayName, Iterable<? extends DynamicNode> dynamicNodes)

Factory for creating a new DynamicContainer for the supplied display name and collection of dynamic nodes.

The collection of dynamic nodes must not contain null elements.

Parameters
displayName:String

the display name for the dynamic container; never null or blank

dynamicNodes:Iterable<? extends DynamicNode>

collection of dynamic nodes to execute; never null

See Also
dynamicContainer(String, Stream)
dynamicContainerback to summary
public static DynamicContainer dynamicContainer(String displayName, Stream<? extends DynamicNode> dynamicNodes)

Factory for creating a new DynamicContainer for the supplied display name and stream of dynamic nodes.

The stream of dynamic nodes must not contain null elements.

Parameters
displayName:String

the display name for the dynamic container; never null or blank

dynamicNodes:Stream<? extends DynamicNode>

stream of dynamic nodes to execute; never null

See Also
dynamicContainer(String, Iterable)
dynamicContainerback to summary
public static DynamicContainer dynamicContainer(String displayName, @Nullable URI testSourceUri, Stream<? extends DynamicNode> dynamicNodes)

Factory for creating a new DynamicContainer for the supplied display name, custom test source URI, and stream of dynamic nodes.

The stream of dynamic nodes must not contain null elements.

Parameters
displayName:String

the display name for the dynamic container; never null or blank

testSourceUri:@Nullable URI

a custom test source URI for the dynamic container; may be null if the framework should generate the test source based on the @TestFactory method

dynamicNodes:Stream<? extends DynamicNode>

stream of dynamic nodes to execute; never null

Since
5.3
See Also
dynamicContainer(String, Iterable)
getChildrenback to summary
public Stream<? extends DynamicNode> getChildren()

Get the Stream of DynamicNodes associated with this DynamicContainer.