edu.rice.cs.drjava.model.junit
Interface JUnitModelCallback

All Known Implementing Classes:
DefaultJUnitModel, InterpreterJVM, MainJVM.DummyJUnitModel

public interface JUnitModelCallback

Callback interface which allows an JUnitModel to respond to tests running in a remote JVM.

Version:
$Id: JUnitModelCallback.java 4419 2008-03-27 06:58:07Z rcartwright $

Method Summary
 void classFileError(ClassFileError e)
          Called from the JUnitTestManager if it encounters an illegal class file.
 Iterable<File> getClassPath()
          Returns the accumulated classpath in use by all Java interpreters
 File getFileForClassName(String className)
          Called when the JUnitTestManager wants to open a file that is not currently open.
 void junitJVMReady()
          Called when the JVM used for unit tests has registered.
 void nonTestCase(boolean isTestAll)
          Called from the JUnitTestManager if its given className is not a test case.
 void testEnded(String testName, boolean wasSuccessful, boolean causedError)
          Called when a particular test has ended.
 void testStarted(String testName)
          Called when a particular test is started.
 void testSuiteEnded(JUnitError[] errors)
          Called when a full suite of tests has finished running.
 void testSuiteStarted(int numTests)
          Called to indicate that a suite of tests has started running.
 

Method Detail

nonTestCase

void nonTestCase(boolean isTestAll)
Called from the JUnitTestManager if its given className is not a test case.

Parameters:
isTestAll - whether or not it was a use of the test all button

classFileError

void classFileError(ClassFileError e)
Called from the JUnitTestManager if it encounters an illegal class file.

Parameters:
e - the ClassFileError object describing the error

testSuiteStarted

void testSuiteStarted(int numTests)
Called to indicate that a suite of tests has started running.

Parameters:
numTests - The number of tests in the suite to be run.

testStarted

void testStarted(String testName)
Called when a particular test is started.

Parameters:
testName - The name of the test being started.

testEnded

void testEnded(String testName,
               boolean wasSuccessful,
               boolean causedError)
Called when a particular test has ended.

Parameters:
testName - The name of the test that has ended.
wasSuccessful - Whether the test passed or not.
causedError - If not successful, whether the test caused an error or simply failed.

testSuiteEnded

void testSuiteEnded(JUnitError[] errors)
Called when a full suite of tests has finished running.

Parameters:
errors - The array of errors from all failed tests in the suite.

getFileForClassName

File getFileForClassName(String className)
Called when the JUnitTestManager wants to open a file that is not currently open.

Parameters:
className - the name of the class for which we want to find the file
Returns:
the file associated with the given class

getClassPath

Iterable<File> getClassPath()
Returns the accumulated classpath in use by all Java interpreters


junitJVMReady

void junitJVMReady()
Called when the JVM used for unit tests has registered.