| edu.rice.cs.drjava.model.MultiThreadedTestCase edu.rice.cs.drjava.model.GlobalModelTestCase edu.rice.cs.drjava.model.GlobalModelIOTest
GlobalModelIOTest | final public class GlobalModelIOTest extends GlobalModelTestCase implements OptionConstants(Code) | | Test I/O functions of the global model.
version: $Id: GlobalModelIOTest.java 4255 2007-08-28 19:17:37Z mgricken $ |
Inner Class :class TestIOListener extends TestListener | |
Inner Class :class TestFileIOListener extends TestIOListener | |
Method Summary | |
public void | testCancelFirstSave() Attempts to make the first save of a document, but cancels instead. | public void | testCancelOpenFile() Initiates a file open, but cancels. | public void | testCancelOpenMultipleFiles() Initiates a file open, but cancels. | public 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. | public void | testCancelSaveAsAlreadySaved() | public void | testCloseFileAllowAbandon() Creates a new document, modifies it, then allows it to be closed, ignoring the changes made. | public void | testCloseFileDisallowAbandon() Creates a new document, modifies it, but disallows a call to close it without saving changes. | public void | testCloseMultipleFiles() Ensures closing documents works correctly. | public void | testConsoleInput() Tests that input can be written to and read from the console correctly. | public void | testFileMovedWhenTriedToSave() | public void | testForceFileOpen() Force a file to be opened with getDocumentforFile. | public void | testLoadHistoryWithAndWithoutSemicolons() Loads two history files, one whose statements end in semicolons, and one whose statements do not. | public void | testModifiedByOther() | public void | testModifiedByOtherFalse() | public void | testMultipleFiles() Creates a new document, modifies it, and then does the same with a second document, checking for inteference. | public void | testMultipleFilesArray() Opens several documents and ensures that the array returned by the model is correct and in the right order. | public void | testOpenMultipleFiles() Opens multiple files. | public void | testOpenMultipleFilesError() Error checking for openening multiple files checks for null and an array w/null. | public void | testOpenMultipleNonexistentFiles() Attempts to open a non-existent file. | public void | testOpenNonexistentFile() Attempts to open a non-existent file. | public void | testOpenRealFile() Opens a file. | public void | testRealSaveFirstSave() Makes a first save of the current document. | public void | testReopenFile() Attempts to reopen an already open file. | public void | testRevertFile() Forces a file to be opened with getDocumentforFile. | public 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. | public void | testSaveAlreadySaved() Saves a file already saved and overwrites its contents. | public void | testSaveAsAlreadySaved() Ensures that saveAs saves to a different file. | public void | testSaveAsExistsAndOpen() | public void | testSaveAsExistsForOverwrite() | public void | testSaveClearAndLoadHistory() Interprets some statements, saves the history, clears the history, then loads the history. |
testCancelSaveAlreadySaved | public void testCancelSaveAlreadySaved() throws BadLocationException, IOException(Code) | | 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. Confirms that no cancellation happens (since the
file is already saved.
|
testCloseFileAllowAbandon | public void testCloseFileAllowAbandon() throws BadLocationException(Code) | | Creates a new document, modifies it, then allows it to be closed, ignoring the changes made.
|
testCloseFileDisallowAbandon | public void testCloseFileDisallowAbandon() throws BadLocationException(Code) | | Creates a new document, modifies it, but disallows a call to close it without saving changes.
|
testCloseMultipleFiles | public void testCloseMultipleFiles() throws BadLocationException(Code) | | Ensures closing documents works correctly.
|
testConsoleInput | public void testConsoleInput() throws EditDocumentException(Code) | | Tests that input can be written to and read from the console correctly.
|
testFileMovedWhenTriedToSave | public void testFileMovedWhenTriedToSave() throws BadLocationException, IOException(Code) | | Test for the possibility that the file has been moved or deleted
since it was last referenced
|
testLoadHistoryWithAndWithoutSemicolons | public void testLoadHistoryWithAndWithoutSemicolons() throws IOException, EditDocumentException, InterruptedException(Code) | | Loads two history files, one whose statements end in semicolons, and one whose statements do not.
Makes sure that it doesn't matter.
|
testMultipleFiles | public void testMultipleFiles() throws BadLocationException(Code) | | Creates a new document, modifies it, and then does the same with a second document, checking for inteference.
|
testMultipleFilesArray | public void testMultipleFilesArray() throws BadLocationException(Code) | | Opens several documents and ensures that the array returned by the model is correct and in the right order.
|
testOpenMultipleFilesError | public void testOpenMultipleFilesError()(Code) | | Error checking for openening multiple files checks for null and an array w/null.
|
testOpenMultipleNonexistentFiles | public void testOpenMultipleNonexistentFiles() throws IOException(Code) | | Attempts to open a non-existent file.
|
testOpenNonexistentFile | public void testOpenNonexistentFile() throws IOException(Code) | | Attempts to open a non-existent file.
|
testSaveAllSaveCorrectFiles | public void testSaveAllSaveCorrectFiles() throws BadLocationException, IOException(Code) | | 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.
|
Methods inherited from edu.rice.cs.drjava.model.GlobalModelTestCase | protected void assertCompileErrorsPresent(boolean b)(Code)(Java Doc) protected void assertCompileErrorsPresent(String name, boolean b)(Code)(Java Doc) protected void assertContents(String s, OpenDefinitionsDocument doc) throws BadLocationException(Code)(Java Doc) protected void assertInteractionsContains(String text) throws EditDocumentException(Code)(Java Doc) protected void assertInteractionsDoesNotContain(String text) throws EditDocumentException(Code)(Java Doc) protected void assertInteractionsDoesNotMatch(String regex) throws EditDocumentException(Code)(Java Doc) protected void assertInteractionsMatches(String regex) throws EditDocumentException(Code)(Java Doc) protected void assertLength(int len, OpenDefinitionsDocument doc)(Code)(Java Doc) protected void assertModified(boolean b, OpenDefinitionsDocument doc)(Code)(Java Doc) protected void assertNumOpenDocs(int num)(Code)(Java Doc) protected void changeDocumentText(String s, OpenDefinitionsDocument doc) throws BadLocationException(Code)(Java Doc) protected File classForJava(File sourceFile, String className)(Code)(Java Doc) protected File createFile(String name)(Code)(Java Doc) protected synchronized OpenDefinitionsDocument doCompile(String text, File file) throws IOException, BadLocationException, InterruptedException(Code)(Java Doc) protected void doCompile(OpenDefinitionsDocument doc, File file) throws IOException, InterruptedException(Code)(Java Doc) protected String getCompilerErrorString()(Code)(Java Doc) protected String getInteractionsText() throws EditDocumentException(Code)(Java Doc) protected String interpret(String input) throws EditDocumentException(Code)(Java Doc) protected void interpretIgnoreResult(String input) throws EditDocumentException(Code)(Java Doc) public void setUp() throws Exception(Code)(Java Doc) protected OpenDefinitionsDocument setupDocument(String text) throws BadLocationException(Code)(Java Doc) public void tearDown() throws Exception(Code)(Java Doc) protected File tempDirectory() throws IOException(Code)(Java Doc) protected File tempFile() throws IOException(Code)(Java Doc) protected File tempFile(int i) throws IOException(Code)(Java Doc) protected File writeToNewTempFile(String text) throws IOException(Code)(Java Doc)
|
Fields inherited from edu.rice.cs.drjava.model.MultiThreadedTestCase | protected static volatile boolean _testFailed(Code)(Java Doc)
|
|
|