|
||||||||||
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.repl.InteractionsModelTest
public final class InteractionsModelTest
Tests the functionality of an InteractionsModel. The synchronization in this class is abominable; many interactions document locking and "event queue only" invariants are violated. The ubiquitous workaround is to call Utilities.clearEventQueue(). TODO: completely revise this class.
Nested Class Summary | |
---|---|
static class |
InteractionsModelTest.TestInteractionsModel
A generic InteractionsModel for testing purposes. |
Field Summary | |
---|---|
protected InteractionsDJDocument |
_adapter
|
protected InteractionsModel |
_model
|
Fields inherited from class edu.rice.cs.drjava.DrJavaTestCase |
---|
TEST_DRJAVA_CONFIG_PROPERTY |
Constructor Summary | |
---|---|
InteractionsModelTest(String name)
|
Method Summary | |
---|---|
protected void |
_assertMainTransformation(String typed,
String expected)
Asserts that the given string typed by the user of the form "java classname" is transformed to the given expected main method invocation. |
protected void |
_assertProcessedContents(String typed,
String expected)
Asserts that the given string typed by the user is processed to become the given expected string for an interpretation. |
protected void |
assertReplThrewContinuationException(String code)
Not a test method, Assumes that _model is an IncompleteInputInteractionsModel. |
protected void |
assertReplThrewSyntaxException(String code)
Not a test method, Assumes that _model is an IncompleteInputInteractionsModel. |
void |
tearDown()
Clean up for every test case. |
void |
testDebugPort()
Tests that a debug port can be generated. |
void |
testInteractionsHistoryStoredCorrectly()
Tests that the interactions history is stored correctly. |
void |
testInterpretCurrentInteraction()
Tests that the correct text is returned when interpreting. |
void |
testInterpretCurrentInteractionWithIncompleteInput()
|
void |
testInterpretJavaArguments()
Tests that "java Classname [args]" runs the class's main method, with simple delimited arguments. |
void |
testInterpretJavaEscapedArgs()
Tests that escaped characters just return the character itself. |
void |
testInterpretJavaQuotedEscapedArgs()
Tests that within a quote, everything is correctly escaped. |
void |
testInterpretJavaSingleQuotedArgs()
Tests that single quotes can be used as argument delimiters. |
void |
testScriptLoading()
Tests that an interactions history can be loaded in as a script. |
void |
testSetChangeInputListener()
Tests that setting and changing an input listener works correctly. |
Methods inherited from class edu.rice.cs.drjava.DrJavaTestCase |
---|
setConfigSetting, setDocText, setUp |
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 |
---|
protected InteractionsDJDocument _adapter
protected InteractionsModel _model
Constructor Detail |
---|
public InteractionsModelTest(String name)
Method Detail |
---|
public void tearDown() throws Exception
DrJavaTestCase
tearDown
in class DrJavaTestCase
Exception
protected void _assertProcessedContents(String typed, String expected) throws Exception
typed
- A string typed by the userexpected
- What the processor should return
Exception
protected void _assertMainTransformation(String typed, String expected)
typed
- the "java classname args ..." typed by the userexpected
- the expected main class callpublic void testInterpretCurrentInteraction() throws Exception
Exception
public void testInterpretCurrentInteractionWithIncompleteInput() throws EditDocumentException, InterruptedException, RemoteException
EditDocumentException
InterruptedException
RemoteException
protected void assertReplThrewContinuationException(String code) throws EditDocumentException, InterruptedException
EditDocumentException
InterruptedException
protected void assertReplThrewSyntaxException(String code) throws EditDocumentException, InterruptedException
EditDocumentException
InterruptedException
public void testInterpretJavaArguments()
public void testInterpretJavaEscapedArgs()
public void testInterpretJavaQuotedEscapedArgs()
public void testInterpretJavaSingleQuotedArgs()
public void testDebugPort() throws IOException
IOException
public void testScriptLoading() throws Exception
Exception
public void testSetChangeInputListener()
public void testInteractionsHistoryStoredCorrectly() throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |