|
||||||||||
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.definitions.DefinitionsDocumentTest
public final class DefinitionsDocumentTest
Tests the functionality of the definitions document.
Field Summary | |
---|---|
protected String |
C_PUBLIC_EI_TEXT
|
protected String |
C_PUBLIC_IE_TEXT
|
protected String |
CEI_TEXT
|
protected String |
CIE_TEXT
|
protected String |
E_PUBLIC_CI_TEXT
|
protected String |
E_PUBLIC_IC_TEXT
|
protected String |
ECI_TEXT
|
protected String |
EIC_TEXT
|
protected String |
I_PUBLIC_CE_TEXT
|
protected String |
I_PUBLIC_EC_TEXT
|
protected String |
ICE_TEXT
|
protected String |
IEC_TEXT
|
protected String |
NESTED_CLASSES_TEXT
|
protected String |
NEWLINE
|
protected String |
PUBLIC_CEI_TEXT
|
protected String |
PUBLIC_CIE_TEXT
|
protected String |
PUBLIC_ECI_TEXT
|
protected String |
PUBLIC_EIC_TEXT
|
protected String |
PUBLIC_ICE_TEXT
|
protected String |
PUBLIC_IEC_TEXT
|
Fields inherited from class edu.rice.cs.drjava.DrJavaTestCase |
---|
TEST_DRJAVA_CONFIG_PROPERTY |
Fields inherited from interface edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates |
---|
FREE, INSIDE_BLOCK_COMMENT, INSIDE_DOUBLE_QUOTE, INSIDE_LINE_COMMENT, INSIDE_SINGLE_QUOTE, STUTTER |
Constructor Summary | |
---|---|
DefinitionsDocumentTest(String name)
Standard constructor. |
Method Summary | |
---|---|
protected void |
setUp()
Create a definitions document to work with. |
static Test |
suite()
Create a test suite for JUnit to run. |
void |
testAnonymousClassIndex()
Test finding anonymous class index on document. |
void |
testExactClassName()
Test exact class name-finding on document. |
void |
testgetMainClassName()
Test getMainClassName. |
void |
textCompoundUndoManager()
Test method for CompoundUndoManager. |
void |
textDeleteDoc()
Test removal of text. |
void |
textGetColumn1()
Tests returning the current column in the document. |
void |
textGetColumn2()
Tests returning the current column in the document. |
void |
textGetLine1()
Test returning second line in a two-line document. |
void |
textGetLine2()
Test going to a specific line. |
void |
textGetLine3()
Test going to the fourth line in a four line document. |
void |
textGetLine4()
Test going to a line beyond the number of lines in a document just goes to the end of the file. |
void |
textGetLine5()
Test going to the first line of an empty document doesn't do anything funny. |
void |
textGetLine6()
Test going to a line that is greater than the line count of an empty document just keeps you in your current location. |
void |
textGetLine7()
Test that going to a line within the document's line count sets the current position to the first character of the line. |
void |
textGetLineDeleteText()
Tests line numbering output after deletion of a block |
void |
textGetLineDeleteText2()
Tests line numbering output after deletion of a block |
void |
textGetPackageNameWithPackageStatementAfterImport()
Puts an otherwise valid package statement after a valid import declaration. |
void |
textGotoLine1()
Test going to the second line in a two-line document. |
void |
textGotoLine2()
Test going to a specific line. |
void |
textGotoLine3()
Test going to the fourth line in a four line document. |
void |
textGotoLine4()
Test going to a line beyond the number of lines in a document just goes to the end of the file. |
void |
textGotoLine5()
Test going to the first line of an empty document doesn't do anything funny. |
void |
textGotoLine6()
Test going to a line that is greater than the line count of an empty document just keeps you in your current location. |
void |
textGotoLine7()
Test that going to a line within the document's line count sets the current position to the first character of the line. |
void |
textHighlightKeywords1()
Test that keywords are highlighted properly. |
void |
textHighlightKeywords2()
This test case simulates what happens when some text is selected and there is a keyword around too. |
void |
textInsertSlashIntoStarSlash()
Test inserting a slash between a star-slash combo. |
void |
textInsertStarIntoSlashStar()
Test inserting a star between a slash-star combo. |
void |
textInsertStarIntoStarSlash()
Test inserting a star between a star-slash combo. |
void |
textInsertToDoc()
Test insertion. |
void |
textPackageNameEmpty()
Test package-finding on empty document. |
void |
textPackageNameSimple()
Test package-finding on simple document, with no funny comments. |
void |
textPackageNameWeird1()
Test package-finding on document with a block comment between parts of package. |
void |
textPackageNameWeird2()
Test package-finding on document with a line comment between parts of package. |
void |
textQualifiedClassNameWithoutPackage()
Tests that the correct qualified class name is returned without a package. |
void |
textQualifiedClassNameWithPackage()
Tests that the correct qualified class name is returned with a package. |
void |
textRemoveTabs1()
Test whether removeTabs actually removes all tabs. |
void |
textRemoveTabs2()
As of drjava-20020122-1534, files with tabs ended up garbled, with some of the text jumbled all around (bug #506630). |
void |
textTabRemovalOnInsertString()
Test whether tabs are removed as appropriate on call to insertString. |
void |
textTabRemovalOnInsertString2()
Test whether tabs are removed as appropriate on call to insertString. |
void |
textTopLevelClassName()
Tests class name-finding on document. |
void |
textTopLevelClassNameMisleading()
Tests class name-finding on document. |
void |
textTopLevelClassNameNoSpace()
Tests that a keyword with no space following it does not cause a StringOutOfBoundsException (bug 742226). |
void |
textTopLevelClassNameWComments()
Test class name-finding on document |
void |
textTopLevelClassNameWithClassloaderImport()
Tests that the word class is not recognized if it is not followed by whitespace. |
void |
textTopLevelClassNameWithDelimiters()
Tests class name-finding on document. |
void |
textTopLevelEnclosingClassName()
Tests that the name of a top level enclosing class can be found. |
void |
textTopLevelInterfaceName()
Test interface name-finding on document |
void |
textTopLevelInterfaceNameBeforeClassName()
Tests class name-finding on document. |
void |
textTopLevelInterfaceNameMisleading()
Tests class name-finding on document |
void |
textTopLevelInterfaceNameMisleading2()
Tests class name-finding on document |
void |
textUndoAndRedoAfterMultipleLineCommentAndUncomment()
Verify that undoing a multiple-line indent will be a single undo action |
void |
textUndoAndRedoAfterMultipleLineIndent()
Verify that undoing a multiple-line indent will be a single undo action |
void |
textUndoOrRedoSetsUnmodifiedState()
Verifies that the undo manager correctly determines if the document has been modified since the last save. |
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 |
---|
protected final String NEWLINE
protected final String NESTED_CLASSES_TEXT
protected final String PUBLIC_CIE_TEXT
protected final String PUBLIC_CEI_TEXT
protected final String PUBLIC_ICE_TEXT
protected final String PUBLIC_IEC_TEXT
protected final String PUBLIC_ECI_TEXT
protected final String PUBLIC_EIC_TEXT
protected final String I_PUBLIC_CE_TEXT
protected final String E_PUBLIC_CI_TEXT
protected final String C_PUBLIC_IE_TEXT
protected final String E_PUBLIC_IC_TEXT
protected final String C_PUBLIC_EI_TEXT
protected final String I_PUBLIC_EC_TEXT
protected final String CIE_TEXT
protected final String CEI_TEXT
protected final String ICE_TEXT
protected final String IEC_TEXT
protected final String ECI_TEXT
protected final String EIC_TEXT
Constructor Detail |
---|
public DefinitionsDocumentTest(String name)
name
- of the testMethod Detail |
---|
protected void setUp() throws Exception
setUp
in class DrJavaTestCase
Exception
- This convention is mandated by JUnit.TestCase, the superclass of this class.public static Test suite()
public void textInsertToDoc() throws BadLocationException
BadLocationException
public void textInsertStarIntoStarSlash() throws BadLocationException
BadLocationException
public void textInsertSlashIntoStarSlash() throws BadLocationException
BadLocationException
public void textInsertStarIntoSlashStar() throws BadLocationException
BadLocationException
public void textDeleteDoc() throws BadLocationException
BadLocationException
public void textHighlightKeywords1() throws BadLocationException
BadLocationException
public void textHighlightKeywords2() throws BadLocationException
BadLocationException
public void textGotoLine1() throws BadLocationException
BadLocationException
public void textGotoLine2() throws BadLocationException
BadLocationException
public void textGotoLine3() throws BadLocationException
BadLocationException
public void textGotoLine4() throws BadLocationException
BadLocationException
public void textGotoLine5()
public void textGotoLine6()
public void textGotoLine7() throws BadLocationException
BadLocationException
public void textGetColumn1() throws BadLocationException
BadLocationException
public void textGetColumn2() throws BadLocationException
BadLocationException
public void textGetLine1() throws BadLocationException
BadLocationException
public void textGetLine2() throws BadLocationException
BadLocationException
public void textGetLine3() throws BadLocationException
BadLocationException
public void textGetLine4() throws BadLocationException
BadLocationException
public void textGetLine5()
public void textGetLine6()
public void textGetLine7() throws BadLocationException
BadLocationException
public void textGetLineDeleteText() throws BadLocationException
BadLocationException
public void textGetLineDeleteText2() throws BadLocationException
BadLocationException
public void textRemoveTabs1()
public void textRemoveTabs2()
public void textTabRemovalOnInsertString2() throws BadLocationException
BadLocationException
public void textTabRemovalOnInsertString() throws BadLocationException
BadLocationException
public void textPackageNameEmpty() throws InvalidPackageException
InvalidPackageException
public void textPackageNameSimple() throws Exception
Exception
public void textPackageNameWeird1() throws BadLocationException, InvalidPackageException
BadLocationException
InvalidPackageException
public void textPackageNameWeird2() throws BadLocationException, InvalidPackageException
BadLocationException
InvalidPackageException
public void textGetPackageNameWithPackageStatementAfterImport() throws BadLocationException, InvalidPackageException
BadLocationException
InvalidPackageException
public void textTopLevelClassName() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
public void textTopLevelInterfaceName() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
public void textTopLevelClassNameWComments() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
public void textTopLevelClassNameNoSpace() throws BadLocationException
BadLocationException
public void textTopLevelClassNameWithClassloaderImport() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
public void textTopLevelClassNameMisleading() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
public void textTopLevelInterfaceNameMisleading() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
public void textTopLevelInterfaceNameMisleading2() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
public void textTopLevelInterfaceNameBeforeClassName() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
public void textTopLevelClassNameWithDelimiters() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
public void textTopLevelEnclosingClassName() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
public void textQualifiedClassNameWithPackage() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
public void textQualifiedClassNameWithoutPackage() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
public void textUndoAndRedoAfterMultipleLineIndent() throws BadLocationException
BadLocationException
public void textUndoAndRedoAfterMultipleLineCommentAndUncomment() throws BadLocationException
BadLocationException
public void textCompoundUndoManager() throws BadLocationException
BadLocationException
public void textUndoOrRedoSetsUnmodifiedState() throws BadLocationException
BadLocationException
public void testAnonymousClassIndex() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
public void testExactClassName() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
public void testgetMainClassName() throws BadLocationException, ClassNameNotFoundException
BadLocationException
ClassNameNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |