Class TestsToRun
java.lang.Object
org.apache.maven.surefire.api.util.TestsToRun
- Direct Known Subclasses:
LazyTestsToRun
Contains all the tests that have been found according to specified include/exclude
specification for a given surefire run.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
containsAtLeast
(int atLeast) private boolean
containsAtLeast
(Iterator<Class<?>> it, int atLeast) boolean
containsExactly
(int items) static TestsToRun
Class<?>
getClassByName
(String className) Get test class which matches classNameClass<?>[]
final boolean
iterated()
iterator()
Returns an iterator over the located java.lang.Class objectsfinal void
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
locatedClasses
-
finished
private volatile boolean finished -
iteratedCount
private int iteratedCount
-
-
Constructor Details
-
TestsToRun
Constructor- Parameters:
locatedClasses
- A set of java.lang.Class objects representing tests to run
-
-
Method Details
-
fromClass
- Throws:
TestSetFailedException
-
iterated
- Returns:
- test classes which have been retrieved by
iterator()
.
-
iterator
Returns an iterator over the located java.lang.Class objects -
markTestSetFinished
public final void markTestSetFinished() -
isFinished
public final boolean isFinished() -
toString
-
containsAtLeast
public boolean containsAtLeast(int atLeast) -
containsAtLeast
-
containsExactly
public boolean containsExactly(int items) -
allowEagerReading
public boolean allowEagerReading()- Returns:
true
, if the classes may be read eagerly.false
, if the classes must only be read lazy.
-
getLocatedClasses
-
getClassByName
Get test class which matches className- Parameters:
className
- string used to find the test class- Returns:
- Class object with the matching name, null if could not find a class with the matching name
-
newWeakIterator
- Returns:
- snapshot of tests upon constructs of internal iterator.
Therefore weakly consistent while
iterator()
is being iterated.
-