Class CompositeTestSource
- java.lang.Object
-
- org.junit.platform.engine.support.descriptor.CompositeTestSource
-
- All Implemented Interfaces:
java.io.Serializable
,TestSource
@API(status=STABLE, since="1.0") public class CompositeTestSource extends java.lang.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(java.lang.Object obj)
static CompositeTestSource
from(java.util.Collection<? extends TestSource> sources)
Create a newCompositeTestSource
based on the supplied collection ofsources
.java.util.List<TestSource>
getSources()
Get an immutable list of the sources stored in thisCompositeTestSource
.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
from
public static CompositeTestSource from(java.util.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 java.util.List<TestSource> getSources()
Get an immutable list of the sources stored in thisCompositeTestSource
.- Returns:
- the sources stored in this
CompositeTestSource
; nevernull
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-