edu.rice.cs.drjava.model
Class GlobalModelJUnitTest.JUnitCompileBeforeTestListener

java.lang.Object
  extended by edu.rice.cs.drjava.model.GlobalModelTestCase.TestListener
      extended by edu.rice.cs.drjava.model.GlobalModelTestCase.InteractionListener
          extended by edu.rice.cs.drjava.model.GlobalModelTestCase.CompileShouldSucceedListener
              extended by edu.rice.cs.drjava.model.GlobalModelTestCase.JUnitTestListener
                  extended by edu.rice.cs.drjava.model.GlobalModelJUnitTest.JUnitCompileBeforeTestListener
All Implemented Interfaces:
CompilerListener, GlobalModelListener, JavadocListener, JUnitListener, InteractionsListener
Enclosing class:
GlobalModelJUnitTest

public class GlobalModelJUnitTest.JUnitCompileBeforeTestListener
extends GlobalModelTestCase.JUnitTestListener

Tests that testing an uncompiled but correct group of files will first compile and then run test.


Field Summary
 
Fields inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase.JUnitTestListener
_junitDone, _junitLock, printMessages
 
Fields inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase.TestListener
_startupTrace, activeCompilerChangedCount, canAbandonCount, classFileErrorCount, closeCount, compileBeforeJavadocCount, compileBeforeJUnitCount, compileEndCount, compileStartCount, consoleResetCount, fileNotFoundCount, filePathContainsPoundCount, fileRevertedCount, hasClearedEventQueue, interactionEndCount, interactionErrorCount, interactionIncompleteCount, interactionStartCount, interpreterChangedCount, interpreterExitedCount, interpreterReadyCount, interpreterResetFailedCount, interpreterResettingCount, junitEndCount, junitStartCount, junitSuiteStartedCount, junitTestEndedCount, junitTestStartedCount, lastExitStatus, newCount, nonTestCaseCount, openCount, quitFileCount, runStartCount, saveBeforeCompileCount, saveBeforeJavadocCount, saveCount, shouldRevertFileCount, undoableEditCount
 
Constructor Summary
GlobalModelJUnitTest.JUnitCompileBeforeTestListener()
           
 
Method Summary
 void compileBeforeJUnit(CompilerListener testAfterCompile, List<OpenDefinitionsDocument> outOfSync)
          Demands that all source files be in sync before running JUnit tests.
 void fileSaved(OpenDefinitionsDocument doc)
          Called after the current document is saved.
 void saveBeforeCompile()
          Called to demand that all open source files be saved before compiling.
 
Methods inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase.JUnitTestListener
_notifyJUnitDone, classFileError, junitEnded, junitStarted, junitSuiteStarted, junitTestEnded, junitTestStarted, logJUnitStart, nonTestCase, resetCompileCounts, resetJUnitCounts, runJUnit, runJUnit, waitJUnitDone
 
Methods inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase.CompileShouldSucceedListener
activeCompilerChanged, checkCompileOccurred, compile, compileAborted, compileEnded, compileStarted, logCompileStart, newFileCreated, waitCompileDone
 
Methods inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase.InteractionListener
consoleReset, getLastExitStatus, interactionEnded, interactionStarted, interpreterExited, interpreterReady, interpreterResetting, logInteractionStart, resetConsoleResetCount, waitInteractionDone, waitResetDone
 
Methods inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase.TestListener
activeDocumentChanged, activeDocumentRefreshed, allFilesClosed, assertAbandonCount, assertActiveCompilerChangedCount, assertClassFileErrorCount, assertCloseCount, assertCompileBeforeJavadocCount, assertCompileBeforeJUnitCount, assertCompileEndCount, assertCompileStartCount, assertConsoleResetCount, assertFileNotFoundCount, assertFileRevertedCount, assertInteractionEndCount, assertInteractionErrorCount, assertInteractionIncompleteCount, assertInteractionsErrorCount, assertInteractionStartCount, assertInterpreterChangedCount, assertInterpreterExitedCount, assertInterpreterReadyCount, assertInterpreterResetFailedCount, assertInterpreterResettingCount, assertJUnitEndCount, assertJUnitStartCount, assertJUnitSuiteStartedCount, assertJUnitTestEndedCount, assertJUnitTestStartedCount, assertNewCount, assertNonTestCaseCount, assertOpenCount, assertQuitFileCount, assertRunStartCount, assertSaveBeforeCompileCount, assertSaveBeforeJavadocCount, assertSaveCount, assertShouldRevertFileCount, assertUndoableEditCount, browserChanged, canAbandonFile, compileBeforeJavadoc, currentDirectoryChanged, documentNotFound, executeAsyncTask, fileClosed, fileOpened, filePathContainsPound, fileReverted, filesNotFound, filesReadOnly, focusOnDefinitionsPane, focusOnLastFocusOwner, handleAlreadyOpenDocument, interactionErrorOccurred, interactionIncomplete, interpreterChanged, interpreterResetFailed, javadocEnded, javadocStarted, junitClassesStarted, listenerFail, openProject, prepareForRun, projectBuildDirChanged, projectClosed, projectModified, projectRunnableChanged, projectWorkDirChanged, quitFile, resetCounts, saveBeforeJavadoc, saveUntitled, shouldRevertFile, undoableEditHappened, updateCurrentLocationInDoc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalModelJUnitTest.JUnitCompileBeforeTestListener

public GlobalModelJUnitTest.JUnitCompileBeforeTestListener()
Method Detail

compileBeforeJUnit

public void compileBeforeJUnit(CompilerListener testAfterCompile,
                               List<OpenDefinitionsDocument> outOfSync)
Description copied from interface: JUnitListener
Demands that all source files be in sync before running JUnit tests. The caller of this method must check if the documents are in sync with their class files using OpenDefinitionsDocument.checkIfClassFileInSync().

Specified by:
compileBeforeJUnit in interface JUnitListener
Overrides:
compileBeforeJUnit in class GlobalModelTestCase.TestListener

saveBeforeCompile

public void saveBeforeCompile()
Description copied from interface: CompilerListener
Called to demand that all open source files be saved before compiling.

Specified by:
saveBeforeCompile in interface CompilerListener
Overrides:
saveBeforeCompile in class GlobalModelTestCase.TestListener

fileSaved

public void fileSaved(OpenDefinitionsDocument doc)
Description copied from interface: GlobalModelListener
Called after the current document is saved.

Specified by:
fileSaved in interface GlobalModelListener
Overrides:
fileSaved in class GlobalModelTestCase.TestListener