edu.rice.cs.drjava.model.repl
Class InteractionsDocumentTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by edu.rice.cs.drjava.DrJavaTestCase
              extended by edu.rice.cs.drjava.model.repl.InteractionsDocumentTest
All Implemented Interfaces:
Test

public final class InteractionsDocumentTest
extends DrJavaTestCase

Tests the functionality of the InteractionsDocument. Most history functionality is tested in HistoryTest.

Version:
$Id: InteractionsDocumentTest.java 4691 2008-12-02 23:33:27Z dlsmith $

Nested Class Summary
static class InteractionsDocumentTest.TestBeep
          Silent beep for a test class.
 
Field Summary
protected  InteractionsDocument _doc
           
 
Fields inherited from class edu.rice.cs.drjava.DrJavaTestCase
TEST_DRJAVA_CONFIG_PROPERTY
 
Constructor Summary
InteractionsDocumentTest()
           
 
Method Summary
protected  void setUp()
          Initialize fields for each test.
 void testCannotEditBeforePrompt()
          Tests that the document prevents editing before the prompt, and beeps if you try.
 void testClearCurrent()
          Tests that clear current interaction works.
 void testContentsAndReset()
          Tests that initial contents are the banner and prompt, and that reset works.
 void testInsertNewline()
          Tests that inserting a newline works.
 void testRecallFromHistory()
          Tests that recalling commands from the history works.
 
Methods inherited from class edu.rice.cs.drjava.DrJavaTestCase
setConfigSetting, setDocText, tearDown
 
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
 

Field Detail

_doc

protected InteractionsDocument _doc
Constructor Detail

InteractionsDocumentTest

public InteractionsDocumentTest()
Method Detail

setUp

protected void setUp()
              throws Exception
Initialize fields for each test.

Overrides:
setUp in class DrJavaTestCase
Throws:
Exception - This convention is mandated by JUnit.TestCase, the superclass of this class.

testCannotEditBeforePrompt

public void testCannotEditBeforePrompt()
                                throws EditDocumentException
Tests that the document prevents editing before the prompt, and beeps if you try.

Throws:
EditDocumentException

testClearCurrent

public void testClearCurrent()
                      throws EditDocumentException
Tests that clear current interaction works.

Throws:
EditDocumentException

testContentsAndReset

public void testContentsAndReset()
                          throws EditDocumentException
Tests that initial contents are the banner and prompt, and that reset works.

Throws:
EditDocumentException

testInsertNewline

public void testInsertNewline()
                       throws EditDocumentException
Tests that inserting a newline works.

Throws:
EditDocumentException

testRecallFromHistory

public void testRecallFromHistory()
                           throws EditDocumentException
Tests that recalling commands from the history works.

Throws:
EditDocumentException