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
A CompositeTestSource contains one or more TestSources.

CompositeTestSource and its sources are immutable.

Since:
1.0
See Also:
  • Method Details

    • from

      public static CompositeTestSource from(Collection<? extends TestSource> sources)
      Create a new CompositeTestSource based on the supplied collection of sources.

      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 this CompositeTestSource; never null or empty
    • getSources

      public final List<TestSource> getSources()
      Get an immutable list of the sources stored in this CompositeTestSource.
      Returns:
      the sources stored in this CompositeTestSource; never null
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object