|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.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.GlobalModelIOTest
public final class GlobalModelIOTest
Test I/O functions of the global model. TODO: move document observations to event thread.
| Nested Class Summary | |
|---|---|
(package private) class |
GlobalModelIOTest.TestFileIOListener
|
(package private) class |
GlobalModelIOTest.TestIOListener
|
| Nested classes/interfaces inherited from class junit.framework.TestCase |
|---|
TestCase.WrappedException |
| Field Summary |
|---|
| Fields inherited from class edu.rice.cs.drjava.model.GlobalModelTestCase |
|---|
_doc, _interactionsController, _log, _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 |
| Fields inherited from class edu.rice.cs.drjava.model.MultiThreadedTestCase |
|---|
_testFailed |
| Constructor Summary | |
|---|---|
GlobalModelIOTest()
|
|
| Method Summary | |
|---|---|
void |
testCancelFirstSave()
Attempts to make the first save of a document, but cancels instead. |
void |
testCancelOpenFile()
Initiates a file open, but cancels. |
void |
testCancelOpenMultipleFiles()
Initiates a file open, but cancels. |
void |
testCancelSaveAlreadySaved()
Saves the document with FOO_TEXT and then saves over the old text, passing in a CancelingSelector to cancel if we are asked for a new file name. |
void |
testCancelSaveAsAlreadySaved()
Make sure that saveAs doesn't save if we cancel! |
void |
testCloseFileAllowAbandon()
Creates a new document, modifies it, then allows it to be closed, ignoring the changes made. |
void |
testCloseFileDisallowAbandon()
Creates a new document, modifies it, but disallows a call to close it without saving changes. |
void |
testCloseMultipleFiles()
Ensures closing documents works correctly. |
void |
testConsoleInput()
Tests that input can be written to and read from the console correctly. |
void |
testFileMovedWhenTriedToSave()
Test for the possibility that the file has been moved or deleted since it was last referenced |
void |
testForceFileOpen()
Force a file to be opened with getDocumentforFile. |
void |
testLoadHistoryWithAndWithoutSemicolons()
Loads two history files, one whose statements end in semicolons, and one whose statements do not. |
void |
testModifiedByOther()
|
void |
testModifiedByOtherFalse()
|
void |
testMultipleFiles()
Creates a new document, modifies it, and then does the same with a second document, checking for inteference. |
void |
testMultipleFilesArray()
Opens several documents and ensures that the array returned by the model is correct and in the right order. |
void |
testOpenMultipleFiles()
Opens multiple files. |
void |
testOpenMultipleFilesError()
Error checking for openening multiple files checks for null and an array w/null. |
void |
testOpenMultipleNonexistentFiles()
Attempts to open a non-existent file. |
void |
testOpenNonexistentFile()
Attempts to open a non-existent file. |
void |
testOpenRealFile()
Opens a file. |
void |
testRealSaveFirstSave()
Makes a first save of the current document. |
void |
testRealSaveFirstSaveCopy()
Makes a first save-copy of the current document, ensures that it's still modified. |
void |
testReopenFile()
Attempts to reopen an already open file. |
void |
testRevertFile()
Forces a file to be opened with getDocumentforFile. |
void |
testSaveAllSaveCorrectFiles()
Ensures that all open files are saved in appropriate order, i.e., even with BAR file as active document, save all should first prompt to save FOO, then BAR. |
void |
testSaveAlreadySaved()
Saves a file already saved and overwrites its contents. |
void |
testSaveAsAlreadySaved()
Ensures that saveAs saves to a different file. |
void |
testSaveAsExistsAndOpen()
|
void |
testSaveAsExistsForOverwrite()
|
void |
testSaveClearAndLoadHistory()
Interprets some statements, saves the history, clears the history, then loads the history. |
| Methods inherited from class edu.rice.cs.drjava.model.MultiThreadedTestCase |
|---|
join, listenerFail, listenerFail, wait |
| Methods inherited from class edu.rice.cs.drjava.DrJavaTestCase |
|---|
setConfigSetting, setDocText |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GlobalModelIOTest()
| Method Detail |
|---|
public void testMultipleFiles()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
public void testMultipleFilesArray()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
public void testCloseMultipleFiles()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
public void testCloseFileAllowAbandon()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
public void testCloseFileDisallowAbandon()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
public void testOpenRealFile()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testCancelOpenFile()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testOpenNonexistentFile()
throws java.io.IOException
java.io.IOException
public void testReopenFile()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testOpenMultipleFiles()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testCancelOpenMultipleFiles()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testOpenMultipleNonexistentFiles()
throws java.io.IOException
java.io.IOExceptionpublic void testOpenMultipleFilesError()
public void testForceFileOpen()
throws javax.swing.text.BadLocationException,
java.io.IOException,
OperationCanceledException,
AlreadyOpenException
javax.swing.text.BadLocationException
java.io.IOException
OperationCanceledException
AlreadyOpenException
public void testCancelFirstSave()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testRealSaveFirstSave()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testRealSaveFirstSaveCopy()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testSaveAlreadySaved()
throws java.lang.Exception
java.lang.Exception
public void testCancelSaveAlreadySaved()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testCancelSaveAsAlreadySaved()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testSaveAsAlreadySaved()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testSaveAsExistsForOverwrite()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testSaveAsExistsAndOpen()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testSaveAllSaveCorrectFiles()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testRevertFile()
throws javax.swing.text.BadLocationException,
java.io.IOException,
OperationCanceledException,
AlreadyOpenException
javax.swing.text.BadLocationException
java.io.IOException
OperationCanceledException
AlreadyOpenException
public void testModifiedByOther()
throws javax.swing.text.BadLocationException,
java.io.IOException,
OperationCanceledException,
AlreadyOpenException,
java.lang.InterruptedException
javax.swing.text.BadLocationException
java.io.IOException
OperationCanceledException
AlreadyOpenException
java.lang.InterruptedException
public void testModifiedByOtherFalse()
throws javax.swing.text.BadLocationException,
java.io.IOException,
OperationCanceledException,
AlreadyOpenException,
java.lang.InterruptedException
javax.swing.text.BadLocationException
java.io.IOException
OperationCanceledException
AlreadyOpenException
java.lang.InterruptedException
public void testSaveClearAndLoadHistory()
throws EditDocumentException,
java.io.IOException,
java.lang.InterruptedException
EditDocumentException
java.io.IOException
java.lang.InterruptedException
public void testLoadHistoryWithAndWithoutSemicolons()
throws java.io.IOException,
EditDocumentException,
java.lang.InterruptedException
java.io.IOException
EditDocumentException
java.lang.InterruptedException
public void testFileMovedWhenTriedToSave()
throws javax.swing.text.BadLocationException,
java.io.IOException
javax.swing.text.BadLocationException
java.io.IOException
public void testConsoleInput()
throws EditDocumentException
EditDocumentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||