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
ACompositeTestSource
contains one or moreTestSources
.CompositeTestSource
and itssources
are immutable.- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
static CompositeTestSource
from(Collection<? extends TestSource> sources)
Create a newCompositeTestSource
based on the supplied collection ofsources
.List<TestSource>
getSources()
Get an immutable list of the sources stored in thisCompositeTestSource
.int
hashCode()
String
toString()
-
-
-
Method Detail
-
from
public static CompositeTestSource from(Collection<? extends TestSource> sources)
Create a newCompositeTestSource
based 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
; nevernull
or 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
-
-