|
||||||||||
| 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.SingleDisplayModelTest
public class SingleDisplayModelTest
Test functions of the single display model.
| Nested Class Summary | |
|---|---|
static class |
SingleDisplayModelTest.SDTestListener
A GlobalModelListener for testing. |
| 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 | |
|---|---|
SingleDisplayModelTest()
|
|
| Method Summary | |
|---|---|
protected void |
assertActiveDocument(OpenDefinitionsDocument doc)
|
protected void |
assertNotEmpty()
|
private DefaultGlobalModel |
getSDModel()
Get the instance of the SingleDisplayModel. |
protected OpenDefinitionsDocument |
setupDocument(java.lang.String text)
Creates and returns a new document, makes sure newFile and activeDocumentChanged events are fired, and then adds some text. |
void |
testCloseFiles()
Tests that active document is switched on close, and that a new file is created after the last one is closed. |
void |
testCloseUnmodifiedAutomatically()
Ensures that an unmodified, empty document is closed after a file is opened, while a modified document is left open. |
void |
testCompleteFilename()
Tests the getCompleteFileName method. |
void |
testDeleteFileBeforeCloseAll()
|
void |
testDeleteFileWhileOpen()
|
void |
testDocumentSwitching()
Tests the setNext and setPrevious functions, making sure that the activeDocumentChanged event is called. |
void |
testNotEmptyOnStartup()
Tests the invariant that at least one document is open at time of creation. |
| 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 SingleDisplayModelTest()
| Method Detail |
|---|
private DefaultGlobalModel getSDModel()
protected void assertNotEmpty()
protected void assertActiveDocument(OpenDefinitionsDocument doc)
protected OpenDefinitionsDocument setupDocument(java.lang.String text)
throws javax.swing.text.BadLocationException
setupDocument in class GlobalModelTestCasejavax.swing.text.BadLocationException
public void testNotEmptyOnStartup()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
public void testDocumentSwitching()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
public void testCloseUnmodifiedAutomatically()
throws javax.swing.text.BadLocationException,
java.io.IOException,
OperationCanceledException,
AlreadyOpenException
javax.swing.text.BadLocationException
java.io.IOException
OperationCanceledException
AlreadyOpenException
public void testCloseFiles()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
public void testCompleteFilename()
throws javax.swing.text.BadLocationException,
java.io.IOException,
OperationCanceledException,
AlreadyOpenException
javax.swing.text.BadLocationException
java.io.IOException
OperationCanceledException
AlreadyOpenException
public void testDeleteFileWhileOpen()
throws java.io.IOException,
OperationCanceledException,
AlreadyOpenException
java.io.IOException
OperationCanceledException
AlreadyOpenException
public void testDeleteFileBeforeCloseAll()
throws java.io.IOException,
OperationCanceledException,
AlreadyOpenException
java.io.IOException
OperationCanceledException
AlreadyOpenException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||