edu.rice.cs.drjava.ui
Class InteractionsPaneTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--edu.rice.cs.drjava.ui.InteractionsPaneTest
All Implemented Interfaces:
Test

public class InteractionsPaneTest
extends TestCase

Test functions of InteractionsPane.

Version:
$Id: InteractionsPaneTest.java,v 1.2 2002/09/04 21:02:18 csreis Exp $

Field Summary
private  InteractionsDocument _interactions
           
private  GlobalModel _model
           
private  InteractionsPane _pane
           
private  boolean _ready
           
 
Fields inherited from class junit.framework.TestCase
fName
 
Constructor Summary
InteractionsPaneTest(String name)
          Constructor.
 
Method Summary
 void setUp()
          Setup method for each JUnit test case.
static Test suite()
          Creates a test suite for JUnit to run.
 void tearDown()
           
 void testCaretMovementCyclesWhenAtEnd()
          Tests that moving the caret right when it's already at the end will cycle it to the prompt.
 void testCaretMovementCyclesWhenAtPrompt()
          Tests that moving the caret left when it's already at the prompt will cycle it to the end of the line.
 void testHistoryRecallMovesToEnd()
          Tests that moving the caret up (recalling the previous command in the History) will move the caret to the end of the document.
 void testInitialPosition()
          Tests that this.setUp() puts the caret in the correct position.
 void testLeftBeforePromptMovesToPrompt()
          Tests that moving the caret left when it's before the prompt will cycle it to the prompt.
 void testRightBeforePromptMovesToEnd()
          Tests that moving the caret right when it's before the prompt will cycle it to the end of the document.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

_model

private GlobalModel _model

_interactions

private InteractionsDocument _interactions

_pane

private InteractionsPane _pane

_ready

private boolean _ready
Constructor Detail

InteractionsPaneTest

public InteractionsPaneTest(String name)
Constructor.
Parameters:
String - name
Method Detail

suite

public static Test suite()
Creates a test suite for JUnit to run.
Returns:
a test suite based on the methods in this class

setUp

public void setUp()
Setup method for each JUnit test case.
Overrides:
setUp in class TestCase

tearDown

public void tearDown()
Overrides:
tearDown in class TestCase

testInitialPosition

public void testInitialPosition()
Tests that this.setUp() puts the caret in the correct position.

testCaretMovementCyclesWhenAtPrompt

public void testCaretMovementCyclesWhenAtPrompt()
Tests that moving the caret left when it's already at the prompt will cycle it to the end of the line.

testCaretMovementCyclesWhenAtEnd

public void testCaretMovementCyclesWhenAtEnd()
Tests that moving the caret right when it's already at the end will cycle it to the prompt.

testLeftBeforePromptMovesToPrompt

public void testLeftBeforePromptMovesToPrompt()
Tests that moving the caret left when it's before the prompt will cycle it to the prompt.

testRightBeforePromptMovesToEnd

public void testRightBeforePromptMovesToEnd()
Tests that moving the caret right when it's before the prompt will cycle it to the end of the document.

testHistoryRecallMovesToEnd

public void testHistoryRecallMovesToEnd()
Tests that moving the caret up (recalling the previous command in the History) will move the caret to the end of the document.