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

java.lang.Object
  |
  +--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,v 1.1 2002/08/15 23:03:57 jhsia Exp $

Field Summary
private  InterpreterJVM _jvm
           
private  JUnitTestRunner _testRunner
           
 
Constructor Summary
JUnitTestManager(InterpreterJVM jvm)
           
 
Method Summary
private  boolean _isTestCase(String className)
          Checks whether the given file name corresponds to a valid JUnit TestCase.
private  int _lineNumber(String sw, String classname)
           
private  JUnitError _makeJUnitError(TestFailure tF, String theclass, boolean isError, String fileName)
          Constructs a new JUnitError from a TestFailure
 JUnitTestRunner getTestRunner()
           
 void runTest(String className, String fileName)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

_jvm

private final InterpreterJVM _jvm

_testRunner

private final JUnitTestRunner _testRunner
Constructor Detail

JUnitTestManager

public JUnitTestManager(InterpreterJVM jvm)
Method Detail

getTestRunner

public JUnitTestRunner getTestRunner()

runTest

public void runTest(String className,
                    String fileName)

_isTestCase

private boolean _isTestCase(String className)
Checks whether the given file name corresponds to a valid JUnit TestCase.

_makeJUnitError

private JUnitError _makeJUnitError(TestFailure tF,
                                   String theclass,
                                   boolean isError,
                                   String fileName)
Constructs a new JUnitError from a TestFailure
Parameters:
tF - A given TestFailure
theclass - The class that contains the TestFailure
isError - The passed TestFailure may signify either an error or a failure
Returns:
JUnitError

_lineNumber

private int _lineNumber(String sw,
                        String classname)