org.apache.maven.surefire.util
Class LazyTestsToRun
java.lang.Object
org.apache.maven.surefire.util.TestsToRun
org.apache.maven.surefire.util.LazyTestsToRun
public class LazyTestsToRun
- extends TestsToRun
A variant of TestsToRun that is provided with test class names
from an InputStream
(e.g. System.in
). The method
iterator()
returns an Iterator that blocks on calls to
Iterator.hasNext()
until new classes are available, or no more
classes will be available.
- Author:
- Andreas Gudian
LazyTestsToRun
public LazyTestsToRun(InputStream testSource,
ClassLoader testClassLoader,
PrintStream originalOutStream)
- C'tor
- Parameters:
testSource
- source to read the tests fromtestClassLoader
- class loader to load the test classesoriginalOutStream
- the output stream to use when requesting new new tests
addWorkItem
protected void addWorkItem(String className)
requestNextTest
protected void requestNextTest()
iterator
public Iterator iterator()
- Description copied from class:
TestsToRun
- Returns an iterator over the located java.lang.Class objects
- Overrides:
iterator
in class TestsToRun
- Returns:
- an unmodifiable iterator
toString
public String toString()
- Overrides:
toString
in class TestsToRun
allowEagerReading
public boolean allowEagerReading()
- Overrides:
allowEagerReading
in class TestsToRun
- Returns:
true
, if the classes may be read eagerly. false
,
if the classes must only be read lazy.
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.