edu.rice.cs.drjava.model.definitions
Class CommentTest

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.definitions.CommentTest
All Implemented Interfaces:
Test

public final class CommentTest
extends DrJavaTestCase

Test the comment lines / uncomment lines functionality.

Version:
$Id: CommentTest.java 4590 2008-07-17 17:17:42Z rcartwright $

Field Summary
protected  DefinitionsDocument doc
           
 
Fields inherited from class edu.rice.cs.drjava.DrJavaTestCase
TEST_DRJAVA_CONFIG_PROPERTY
 
Constructor Summary
CommentTest()
           
 
Method Summary
 void setUp()
          Resents configuration settings and sets up the indent level so that we can predict the correct behavior for indenting.
 void testCommentOutMultipleLines()
          Tests the Comment Out Line(s) command with multiple lines.
 void testCommentOutSingleLine()
          Tests the Comment Out Line(s) command with a single line.
 void testUncommentIgnoreMultipleLines()
          Tests the Uncomment Line(s) command with multiple lines.
 void testUncommentIgnoreSingleLine()
          Tests the Uncomment Line(s) command with a single line.
 void testUncommentMultipleLines()
          Tests the Uncomment Line(s) command with multiple lines.
 void testUncommentSingleLine()
          Tests the Uncomment Line(s) command with a single line.
 
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 DefinitionsDocument doc
Constructor Detail

CommentTest

public CommentTest()
Method Detail

setUp

public void setUp()
           throws Exception
Resents configuration settings and sets up the indent level so that we can predict the correct behavior for indenting.

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

testCommentOutSingleLine

public void testCommentOutSingleLine()
                              throws BadLocationException
Tests the Comment Out Line(s) command with a single line.

Throws:
BadLocationException

testCommentOutMultipleLines

public void testCommentOutMultipleLines()
                                 throws BadLocationException
Tests the Comment Out Line(s) command with multiple lines.

Throws:
BadLocationException

testUncommentIgnoreSingleLine

public void testUncommentIgnoreSingleLine()
                                   throws BadLocationException
Tests the Uncomment Line(s) command with a single line. These sample lines should be ignored by the algorithm.

Throws:
BadLocationException

testUncommentIgnoreMultipleLines

public void testUncommentIgnoreMultipleLines()
                                      throws BadLocationException
Tests the Uncomment Line(s) command with multiple lines. These sample lines should be ignored by the algorithm.

Throws:
BadLocationException

testUncommentSingleLine

public void testUncommentSingleLine()
                             throws BadLocationException
Tests the Uncomment Line(s) command with a single line. One of these sample lines should be uncommented and indented by the algorithm.

Throws:
BadLocationException

testUncommentMultipleLines

public void testUncommentMultipleLines()
                                throws BadLocationException
Tests the Uncomment Line(s) command with multiple lines. These sample lines should be uncommented and indented by the algorithm.

Throws:
BadLocationException