Class TestsToRun
java.lang.Object
org.apache.maven.surefire.api.util.TestsToRun
Contains all the tests that have been found according to specified include/exclude
specification for a given surefire run.
- Author:
- Kristian Rosenvold (junit core adaption)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
containsAtLeast
(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
-
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) -
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
-