Package org.apache.maven.surefire.util
Class TestsToRun
java.lang.Object
org.apache.maven.surefire.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 booleanprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancontainsAtLeast(int atLeast) private booleancontainsAtLeast(Iterator<Class<?>> it, int atLeast) booleancontainsExactly(int items) static TestsToRunClass<?>getClassByName(String className) Get test class which matches classNameClass<?>[]final booleaniterated()iterator()Returns an iterator over the located java.lang.Class objectsfinal voidtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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.
-