edu.rice.cs.drjava.model
Class GlobalModelCompileTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
edu.rice.cs.drjava.DrJavaTestCase
edu.rice.cs.drjava.model.MultiThreadedTestCase
edu.rice.cs.drjava.model.GlobalModelTestCase
edu.rice.cs.drjava.model.GlobalModelCompileTest
- All Implemented Interfaces:
- Test
public final class GlobalModelCompileTest
- extends GlobalModelTestCase
Tests to ensure that compilation behaves correctly in border cases.
- Version:
- $Id: GlobalModelCompileTest.java 4691 2008-12-02 23:33:27Z dlsmith $
Nested classes/interfaces inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase |
GlobalModelTestCase.CancelingSelector, GlobalModelTestCase.CompileShouldFailListener, GlobalModelTestCase.CompileShouldSucceedListener, GlobalModelTestCase.FileMovedWarningException, GlobalModelTestCase.FileSelector, GlobalModelTestCase.InteractionListener, GlobalModelTestCase.JUnitNonTestListener, GlobalModelTestCase.JUnitTestListener, GlobalModelTestCase.OpenWarningException, GlobalModelTestCase.OverwriteException, GlobalModelTestCase.TestGlobalModel, GlobalModelTestCase.TestListener, GlobalModelTestCase.WarningFileSelector |
Field Summary |
protected static Log |
_log
|
Fields inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase |
_doc, _interactionsController, _model, _tempDir, BAR_TEXT, BAZ_TEXT, FOO_MISSING_CLOSE_TEXT, FOO_PACKAGE_AFTER_IMPORT, FOO_PACKAGE_AS_FIELD, FOO_PACKAGE_AS_FIELD_2, FOO_PACKAGE_AS_PART_OF_FIELD, FOO_PACKAGE_INSIDE_CLASS, FOO_TEXT |
Method Summary |
void |
testCompileAbortsIfAnyUnsaved()
If we try to compile while any files are unsaved, and if we don't save when asked to saveAllBeforeProceeding,
it should not do the compile or any other actions. |
void |
testCompileAbortsIfUnsaved()
If we try to compile an unsaved file, and if we don't save when asked to saveAllBeforeProceeding, it should
not do the compile or any other actions. |
void |
testCompileActiveSavedAnyUnsavedButSaveWhenAsked()
If we try to compile while any files (but not the active file) are unsaved but we do save it from within
saveAllBeforeProceeding, the compile should occur happily. |
void |
testCompileAllWithNoFiles()
Tests calling compileAll with no source files works. |
void |
testCompileAnyUnsavedButSaveWhenAsked()
If we try to compile while any files (including the active file) are unsaved but we do save it from within saveAllBeforeProceeding, the
compile should occur happily. |
void |
testCompileResetsInteractions()
Tests that the interactions pane is reset after a successful compile. |
Methods inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase |
assertCompileErrorsPresent, assertCompileErrorsPresent, assertContents, assertInteractionsContains, assertInteractionsDoesNotContain, assertInteractionsDoesNotMatch, assertInteractionsMatches, assertLength, assertModified, assertNumOpenDocs, changeDocumentText, classForJava, createFile, doCompile, doCompile, getCompilerErrorString, getInteractionsText, interpret, interpretIgnoreResult, safeLoadHistory, safeSaveHistory, saveAllFiles, saveFile, saveFileAs, setUp, setupDocument, tearDown, tempDirectory, tempFile, tempFile, testStartCompile, writeToNewTempFile |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
_log
protected static final Log _log
GlobalModelCompileTest
public GlobalModelCompileTest()
testCompileAllWithNoFiles
public void testCompileAllWithNoFiles()
throws BadLocationException,
IOException,
InterruptedException
- Tests calling compileAll with no source files works. Does not reset interactions.
- Throws:
BadLocationException
IOException
InterruptedException
testCompileResetsInteractions
public void testCompileResetsInteractions()
throws BadLocationException,
IOException,
InterruptedException,
EditDocumentException
- Tests that the interactions pane is reset after a successful compile.
- Throws:
BadLocationException
IOException
InterruptedException
EditDocumentException
testCompileAbortsIfUnsaved
public void testCompileAbortsIfUnsaved()
throws Exception
- If we try to compile an unsaved file, and if we don't save when asked to saveAllBeforeProceeding, it should
not do the compile or any other actions.
- Throws:
Exception
testCompileAbortsIfAnyUnsaved
public void testCompileAbortsIfAnyUnsaved()
throws Exception
- If we try to compile while any files are unsaved, and if we don't save when asked to saveAllBeforeProceeding,
it should not do the compile or any other actions.
- Throws:
Exception
testCompileAnyUnsavedButSaveWhenAsked
public void testCompileAnyUnsavedButSaveWhenAsked()
throws BadLocationException,
IOException,
InterruptedException
- If we try to compile while any files (including the active file) are unsaved but we do save it from within saveAllBeforeProceeding, the
compile should occur happily. Doesn't reset interactions because no interpretations are performed.
- Throws:
BadLocationException
IOException
InterruptedException
testCompileActiveSavedAnyUnsavedButSaveWhenAsked
public void testCompileActiveSavedAnyUnsavedButSaveWhenAsked()
throws BadLocationException,
IOException,
InterruptedException
- If we try to compile while any files (but not the active file) are unsaved but we do save it from within
saveAllBeforeProceeding, the compile should occur happily. Does not reset interactions.
- Throws:
BadLocationException
IOException
InterruptedException