Java Doc for DefinitionsDocumentTest.java in  » IDE » DrJava » edu » rice » cs » drjava » model » definitions » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE » DrJava » edu.rice.cs.drjava.model.definitions 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


edu.rice.cs.drjava.DrJavaTestCase
   edu.rice.cs.drjava.model.definitions.DefinitionsDocumentTest

DefinitionsDocumentTest
final public class DefinitionsDocumentTest extends DrJavaTestCase implements ReducedModelStates(Code)
Tests the functionality of the definitions document.
version:
   $Id: DefinitionsDocumentTest.java 4255 2007-08-28 19:17:37Z mgricken $


Field Summary
final protected  StringNESTED_CLASSES_TEXT
    
final protected  StringNEWLINE
    

Constructor Summary
public  DefinitionsDocumentTest(String name)
     Standard constructor.

Method Summary
protected  voidsetUp()
     Create a definitions document to work with.
public static  Testsuite()
     Create a test suite for JUnit to run.
public  voidtestAnonymousClassIndex()
     Test finding anonymous class index on document.
public  voidtestCompoundUndoManager()
     Test method for CompoundUndoManager.
public  voidtestDeleteDoc()
     Test removal of text.
public  voidtestExactClassName()
     Test exact class name-finding on document.
public  voidtestGetColumn1()
     Tests returning the current column in the document.
public  voidtestGetColumn2()
     Tests returning the current column in the document.
public  voidtestGetLine1()
     Test returning second line in a two-line document.
public  voidtestGetLine2()
     Test going to a specific line.
public  voidtestGetLine3()
     Test going to the fourth line in a four line document.
public  voidtestGetLine4()
     Test going to a line beyond the number of lines in a document just goes to the end of the file.
public  voidtestGetLine5()
     Test going to the first line of an empty document doesn't do anything funny.
public  voidtestGetLine6()
     Test going to a line that is greater than the line count of an empty document just keeps you in your current location.
public  voidtestGetLine7()
     Test that going to a line within the document's line count sets the current position to the first character of the line.
public  voidtestGetLineDeleteText()
    
public  voidtestGetLineDeleteText2()
    
public  voidtestGetPackageNameWithPackageStatementAfterImport()
     Puts an otherwise valid package statement after a valid import declaration.
public  voidtestGotoLine1()
     Test going to the second line in a two-line document.
public  voidtestGotoLine2()
     Test going to a specific line.
public  voidtestGotoLine3()
     Test going to the fourth line in a four line document.
public  voidtestGotoLine4()
     Test going to a line beyond the number of lines in a document just goes to the end of the file.
public  voidtestGotoLine5()
     Test going to the first line of an empty document doesn't do anything funny.
public  voidtestGotoLine6()
     Test going to a line that is greater than the line count of an empty document just keeps you in your current location.
public  voidtestGotoLine7()
     Test that going to a line within the document's line count sets the current position to the first character of the line.
public  voidtestHighlightKeywords1()
     Test that keywords are highlighted properly.
public  voidtestHighlightKeywords2()
     This test case simulates what happens when some text is selected and there is a keyword around too. In drjava-20010720-1712 there is a bug that if you enter "int Y" and then try to select "t Y", it exceptions.
public  voidtestInsertSlashIntoStarSlash()
     Test inserting a slash between a star-slash combo.
public  voidtestInsertStarIntoSlashStar()
     Test inserting a star between a slash-star combo.
public  voidtestInsertStarIntoStarSlash()
     Test inserting a star between a star-slash combo.
public  voidtestInsertToDoc()
     Test insertion.
public  voidtestPackageNameEmpty()
     Test package-finding on empty document.
public  voidtestPackageNameSimple()
     Test package-finding on simple document, with no funny comments.
public  voidtestPackageNameWeird1()
     Test package-finding on document with a block comment between parts of package.
public  voidtestPackageNameWeird2()
     Test package-finding on document with a line comment between parts of package.
public  voidtestQualifiedClassNameWithPackage()
     Tests that the correct qualified class name is returned with a package.
public  voidtestQualifiedClassNameWithoutPackage()
     Tests that the correct qualified class name is returned without a package.
public  voidtestRemoveTabs1()
     Test whether removeTabs actually removes all tabs.
public  voidtestRemoveTabs2()
     As of drjava-20020122-1534, files with tabs ended up garbled, with some of the text jumbled all around (bug #506630).
public  voidtestTabRemovalOnInsertString()
     Test whether tabs are removed as appropriate on call to insertString.
public  voidtestTabRemovalOnInsertString2()
     Test whether tabs are removed as appropriate on call to insertString.
public  voidtestTopLevelClassName()
     Tests class name-finding on document.
public  voidtestTopLevelClassNameMisleading()
     Tests class name-finding on document.
public  voidtestTopLevelClassNameNoSpace()
     Tests that a keyword with no space following it does not cause a StringOutOfBoundsException (bug 742226).
public  voidtestTopLevelClassNameWComments()
    
public  voidtestTopLevelClassNameWithClassloaderImport()
     Tests that the word class is not recognized if it is not followed by whitespace.
public  voidtestTopLevelClassNameWithDelimiters()
     Tests class name-finding on document.
public  voidtestTopLevelEnclosingClassName()
     Tests that the name of a top level enclosing class can be found.
public  voidtestTopLevelInterfaceName()
    
public  voidtestTopLevelInterfaceNameBeforeClassName()
     Tests class name-finding on document.
public  voidtestTopLevelInterfaceNameMisleading()
    
public  voidtestTopLevelInterfaceNameMisleading2()
    
public  voidtestUndoAndRedoAfterMultipleLineCommentAndUncomment()
    
public  voidtestUndoAndRedoAfterMultipleLineIndent()
    
public  voidtestUndoOrRedoSetsUnmodifiedState()
     Verifies that the undo manager correctly determines if the document has been modified since the last save.

Field Detail
NESTED_CLASSES_TEXT
final protected String NESTED_CLASSES_TEXT(Code)



NEWLINE
final protected String NEWLINE(Code)




Constructor Detail
DefinitionsDocumentTest
public DefinitionsDocumentTest(String name)(Code)
Standard constructor.
Parameters:
  name - of the test




Method Detail
setUp
protected void setUp() throws Exception(Code)
Create a definitions document to work with.



suite
public static Test suite()(Code)
Create a test suite for JUnit to run. a test suite based on this class



testAnonymousClassIndex
public void testAnonymousClassIndex() throws BadLocationException, ClassNameNotFoundException(Code)
Test finding anonymous class index on document.



testCompoundUndoManager
public void testCompoundUndoManager() throws BadLocationException(Code)
Test method for CompoundUndoManager. Tests that the nested compound edit functionality works correctly.
throws:
  BadLocationException -



testDeleteDoc
public void testDeleteDoc() throws BadLocationException(Code)
Test removal of text.



testExactClassName
public void testExactClassName() throws BadLocationException, ClassNameNotFoundException(Code)
Test exact class name-finding on document.



testGetColumn1
public void testGetColumn1() throws BadLocationException(Code)
Tests returning the current column in the document.



testGetColumn2
public void testGetColumn2() throws BadLocationException(Code)
Tests returning the current column in the document.



testGetLine1
public void testGetLine1() throws BadLocationException(Code)
Test returning second line in a two-line document.
exception:
  BadLocationException -



testGetLine2
public void testGetLine2() throws BadLocationException(Code)
Test going to a specific line.
exception:
  BadLocationException -



testGetLine3
public void testGetLine3() throws BadLocationException(Code)
Test going to the fourth line in a four line document.
exception:
  BadLocationException -



testGetLine4
public void testGetLine4() throws BadLocationException(Code)
Test going to a line beyond the number of lines in a document just goes to the end of the file.
exception:
  BadLocationException -



testGetLine5
public void testGetLine5()(Code)
Test going to the first line of an empty document doesn't do anything funny. It should stay in the same location.



testGetLine6
public void testGetLine6()(Code)
Test going to a line that is greater than the line count of an empty document just keeps you in your current location.



testGetLine7
public void testGetLine7() throws BadLocationException(Code)
Test that going to a line within the document's line count sets the current position to the first character of the line.
exception:
  BadLocationException -



testGetLineDeleteText
public void testGetLineDeleteText() throws BadLocationException(Code)
Tests line numbering output after deletion of a block



testGetLineDeleteText2
public void testGetLineDeleteText2() throws BadLocationException(Code)
Tests line numbering output after deletion of a block



testGetPackageNameWithPackageStatementAfterImport
public void testGetPackageNameWithPackageStatementAfterImport() throws BadLocationException, InvalidPackageException(Code)
Puts an otherwise valid package statement after a valid import declaration. This should result in seeing no package statement (for the purposes of getSourceRoot), so the resulting package name should be "".



testGotoLine1
public void testGotoLine1() throws BadLocationException(Code)
Test going to the second line in a two-line document.
exception:
  BadLocationException -



testGotoLine2
public void testGotoLine2() throws BadLocationException(Code)
Test going to a specific line.
exception:
  BadLocationException -



testGotoLine3
public void testGotoLine3() throws BadLocationException(Code)
Test going to the fourth line in a four line document.
exception:
  BadLocationException -



testGotoLine4
public void testGotoLine4() throws BadLocationException(Code)
Test going to a line beyond the number of lines in a document just goes to the end of the file.
exception:
  BadLocationException -



testGotoLine5
public void testGotoLine5()(Code)
Test going to the first line of an empty document doesn't do anything funny. It should stay in the same location.



testGotoLine6
public void testGotoLine6()(Code)
Test going to a line that is greater than the line count of an empty document just keeps you in your current location.



testGotoLine7
public void testGotoLine7() throws BadLocationException(Code)
Test that going to a line within the document's line count sets the current position to the first character of the line.
exception:
  BadLocationException -



testHighlightKeywords1
public void testHighlightKeywords1() throws BadLocationException(Code)
Test that keywords are highlighted properly.
exception:
  BadLocationException -



testHighlightKeywords2
public void testHighlightKeywords2() throws BadLocationException(Code)
This test case simulates what happens when some text is selected and there is a keyword around too. In drjava-20010720-1712 there is a bug that if you enter "int Y" and then try to select "t Y", it exceptions. This is a test for that case. The important thing about the selecting thing is that because it wants to render the last three chars selected, it asks for the first two only in the call to getHighlightStatus.
exception:
  BadLocationException -



testInsertSlashIntoStarSlash
public void testInsertSlashIntoStarSlash() throws BadLocationException(Code)
Test inserting a slash between a star-slash combo.
exception:
  BadLocationException -



testInsertStarIntoSlashStar
public void testInsertStarIntoSlashStar() throws BadLocationException(Code)
Test inserting a star between a slash-star combo.
exception:
  BadLocationException -



testInsertStarIntoStarSlash
public void testInsertStarIntoStarSlash() throws BadLocationException(Code)
Test inserting a star between a star-slash combo.
exception:
  BadLocationException -



testInsertToDoc
public void testInsertToDoc() throws BadLocationException(Code)
Test insertion.



testPackageNameEmpty
public void testPackageNameEmpty() throws InvalidPackageException(Code)
Test package-finding on empty document.



testPackageNameSimple
public void testPackageNameSimple() throws Exception(Code)
Test package-finding on simple document, with no funny comments.



testPackageNameWeird1
public void testPackageNameWeird1() throws BadLocationException, InvalidPackageException(Code)
Test package-finding on document with a block comment between parts of package.



testPackageNameWeird2
public void testPackageNameWeird2() throws BadLocationException, InvalidPackageException(Code)
Test package-finding on document with a line comment between parts of package.



testQualifiedClassNameWithPackage
public void testQualifiedClassNameWithPackage() throws BadLocationException, ClassNameNotFoundException(Code)
Tests that the correct qualified class name is returned with a package.



testQualifiedClassNameWithoutPackage
public void testQualifiedClassNameWithoutPackage() throws BadLocationException, ClassNameNotFoundException(Code)
Tests that the correct qualified class name is returned without a package.



testRemoveTabs1
public void testRemoveTabs1()(Code)
Test whether removeTabs actually removes all tabs.



testRemoveTabs2
public void testRemoveTabs2()(Code)
As of drjava-20020122-1534, files with tabs ended up garbled, with some of the text jumbled all around (bug #506630). This test aims to replicate the problem.



testTabRemovalOnInsertString
public void testTabRemovalOnInsertString() throws BadLocationException(Code)
Test whether tabs are removed as appropriate on call to insertString.



testTabRemovalOnInsertString2
public void testTabRemovalOnInsertString2() throws BadLocationException(Code)
Test whether tabs are removed as appropriate on call to insertString.



testTopLevelClassName
public void testTopLevelClassName() throws BadLocationException, ClassNameNotFoundException(Code)
Tests class name-finding on document.



testTopLevelClassNameMisleading
public void testTopLevelClassNameMisleading() throws BadLocationException, ClassNameNotFoundException(Code)
Tests class name-finding on document.



testTopLevelClassNameNoSpace
public void testTopLevelClassNameNoSpace() throws BadLocationException(Code)
Tests that a keyword with no space following it does not cause a StringOutOfBoundsException (bug 742226).



testTopLevelClassNameWComments
public void testTopLevelClassNameWComments() throws BadLocationException, ClassNameNotFoundException(Code)
Test class name-finding on document



testTopLevelClassNameWithClassloaderImport
public void testTopLevelClassNameWithClassloaderImport() throws BadLocationException, ClassNameNotFoundException(Code)
Tests that the word class is not recognized if it is not followed by whitespace.



testTopLevelClassNameWithDelimiters
public void testTopLevelClassNameWithDelimiters() throws BadLocationException, ClassNameNotFoundException(Code)
Tests class name-finding on document.



testTopLevelEnclosingClassName
public void testTopLevelEnclosingClassName() throws BadLocationException, ClassNameNotFoundException(Code)
Tests that the name of a top level enclosing class can be found.



testTopLevelInterfaceName
public void testTopLevelInterfaceName() throws BadLocationException, ClassNameNotFoundException(Code)
Test interface name-finding on document



testTopLevelInterfaceNameBeforeClassName
public void testTopLevelInterfaceNameBeforeClassName() throws BadLocationException, ClassNameNotFoundException(Code)
Tests class name-finding on document.



testTopLevelInterfaceNameMisleading
public void testTopLevelInterfaceNameMisleading() throws BadLocationException, ClassNameNotFoundException(Code)
Tests class name-finding on document



testTopLevelInterfaceNameMisleading2
public void testTopLevelInterfaceNameMisleading2() throws BadLocationException, ClassNameNotFoundException(Code)
Tests class name-finding on document



testUndoAndRedoAfterMultipleLineCommentAndUncomment
public void testUndoAndRedoAfterMultipleLineCommentAndUncomment() throws BadLocationException(Code)
Verify that undoing a multiple-line indent will be a single undo action
throws:
  BadLocationException -



testUndoAndRedoAfterMultipleLineIndent
public void testUndoAndRedoAfterMultipleLineIndent() throws BadLocationException(Code)
Verify that undoing a multiple-line indent will be a single undo action
throws:
  BadLocationException -



testUndoOrRedoSetsUnmodifiedState
public void testUndoOrRedoSetsUnmodifiedState() throws BadLocationException(Code)
Verifies that the undo manager correctly determines if the document has been modified since the last save.



Fields inherited from edu.rice.cs.drjava.DrJavaTestCase
final public static String TEST_DRJAVA_CONFIG_PROPERTY(Code)(Java Doc)

Methods inherited from edu.rice.cs.drjava.DrJavaTestCase
protected void setUp() throws Exception(Code)(Java Doc)
protected void tearDown() throws Exception(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.