Package org.junit.jupiter.api
Class DynamicContainer
- java.lang.Object
-
- org.junit.jupiter.api.DynamicNode
-
- org.junit.jupiter.api.DynamicContainer
-
@API(status=MAINTAINED, since="5.3") public class DynamicContainer extends DynamicNodeADynamicContaineris a container generated at runtime.It is composed of a display name and an
IterableorStreamofDynamicNodes.Instances of
DynamicContainermust be generated by factory methods annotated with@TestFactory.- Since:
- 5.0
- See Also:
dynamicContainer(String, Iterable),dynamicContainer(String, Stream),TestFactory,DynamicTest
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DynamicContainerdynamicContainer(java.lang.String displayName, java.lang.Iterable<? extends DynamicNode> dynamicNodes)Factory for creating a newDynamicContainerfor the supplied display name and collection of dynamic nodes.static DynamicContainerdynamicContainer(java.lang.String displayName, java.net.URI testSourceUri, java.util.stream.Stream<? extends DynamicNode> dynamicNodes)Factory for creating a newDynamicContainerfor the supplied display name, custom test sourceURI, and stream of dynamic nodes.static DynamicContainerdynamicContainer(java.lang.String displayName, java.util.stream.Stream<? extends DynamicNode> dynamicNodes)Factory for creating a newDynamicContainerfor the supplied display name and stream of dynamic nodes.java.util.stream.Stream<? extends DynamicNode>getChildren()-
Methods inherited from class org.junit.jupiter.api.DynamicNode
getDisplayName, getTestSourceUri, toString
-
-
-
-
Method Detail
-
dynamicContainer
public static DynamicContainer dynamicContainer(java.lang.String displayName, java.lang.Iterable<? extends DynamicNode> dynamicNodes)
Factory for creating a newDynamicContainerfor the supplied display name and collection of dynamic nodes.The collection of dynamic nodes must not contain
nullelements.- Parameters:
displayName- the display name for the dynamic container; nevernullor blankdynamicNodes- collection of dynamic nodes to execute; nevernull- See Also:
dynamicContainer(String, Stream)
-
dynamicContainer
public static DynamicContainer dynamicContainer(java.lang.String displayName, java.util.stream.Stream<? extends DynamicNode> dynamicNodes)
Factory for creating a newDynamicContainerfor the supplied display name and stream of dynamic nodes.The stream of dynamic nodes must not contain
nullelements.- Parameters:
displayName- the display name for the dynamic container; nevernullor blankdynamicNodes- stream of dynamic nodes to execute; nevernull- See Also:
dynamicContainer(String, Iterable)
-
dynamicContainer
public static DynamicContainer dynamicContainer(java.lang.String displayName, java.net.URI testSourceUri, java.util.stream.Stream<? extends DynamicNode> dynamicNodes)
Factory for creating a newDynamicContainerfor the supplied display name, custom test sourceURI, and stream of dynamic nodes.The stream of dynamic nodes must not contain
nullelements.- Parameters:
displayName- the display name for the dynamic container; nevernullor blanktestSourceUri- a custom test source URI for the dynamic container; may benullif the framework should generate the test source based on the@TestFactorymethoddynamicNodes- stream of dynamic nodes to execute; nevernull- Since:
- 5.3
- See Also:
dynamicContainer(String, Iterable)
-
getChildren
public java.util.stream.Stream<? extends DynamicNode> getChildren()
-
-