Class CompositeTestSource
- java.lang.Object
-
- org.junit.platform.engine.support.descriptor.CompositeTestSource
-
- All Implemented Interfaces:
Serializable,TestSource
@API(status=STABLE, since="1.0") public class CompositeTestSource extends Object implements TestSource
ACompositeTestSourcecontains one or moreTestSources.CompositeTestSourceand itssourcesare immutable.- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static CompositeTestSourcefrom(Collection<? extends TestSource> sources)Create a newCompositeTestSourcebased on the supplied collection ofsources.List<TestSource>getSources()Get an immutable list of the sources stored in thisCompositeTestSource.inthashCode()StringtoString()
-
-
-
Method Detail
-
from
public static CompositeTestSource from(Collection<? extends TestSource> sources)
Create a newCompositeTestSourcebased on the supplied collection ofsources.This constructor makes a defensive copy of the supplied collection and stores the sources as a list in the order in which they are returned by the collection's iterator.
- Parameters:
sources- the collection of sources to store in thisCompositeTestSource; nevernullor empty
-
getSources
public final List<TestSource> getSources()
Get an immutable list of the sources stored in thisCompositeTestSource.- Returns:
- the sources stored in this
CompositeTestSource; nevernull
-
-