edu.rice.cs.drjava.model.junit
Class JUnitTestManager

java.lang.Object
  extended by edu.rice.cs.drjava.model.junit.JUnitTestManager

public class JUnitTestManager
extends Object

Runs in the InterpreterJVM. Runs tests given a classname and formats the results into a (serializable) array of JUnitError that can be passed back to the MainJVM.

Version:
$Id: JUnitTestManager.java 4691 2008-12-02 23:33:27Z dlsmith $

Field Summary
protected static Log _log
           
 
Constructor Summary
JUnitTestManager(JUnitModelCallback jmc, Lambda<ClassLoader,ClassLoader> loaderFactory)
          Standard constructor
 
Method Summary
 List<String> findTestClasses(List<String> classNames, List<File> files)
          Find the test classes among the given classNames and accumulate them in TestSuite for junit.
 boolean runTestSuite()
          Runs the pending test suite set up by the preceding call to findTestClasses.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log

protected static final Log _log
Constructor Detail

JUnitTestManager

public JUnitTestManager(JUnitModelCallback jmc,
                        Lambda<ClassLoader,ClassLoader> loaderFactory)
Standard constructor

Method Detail

findTestClasses

public List<String> findTestClasses(List<String> classNames,
                                    List<File> files)
Find the test classes among the given classNames and accumulate them in TestSuite for junit. Returns null if a test suite is already pending.

Parameters:
classNames - the class names that are test class candidates
files - the files corresponding to classNames

runTestSuite

public boolean runTestSuite()
Runs the pending test suite set up by the preceding call to findTestClasses. Runs in a single auxiliary thread, so no need for explicit synchronization.

Returns:
false if no test suite (even an empty one) has been set up