edu.rice.cs.drjava.model.definitions.indent
Class QuestionLineContainsTest

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.indent.IndentRulesTestCase
                  extended by edu.rice.cs.drjava.model.definitions.indent.QuestionLineContainsTest
All Implemented Interfaces:
junit.framework.Test

public final class QuestionLineContainsTest
extends IndentRulesTestCase

Tests the question rule which determines if the current line in the document contains the given character.

All tests check for the ':' character on the current line.

Version:
$Id: QuestionLineContainsTest.java 5175 2010-01-20 08:46:32Z mgricken $

Nested Class Summary
 
Nested classes/interfaces inherited from class junit.framework.TestCase
junit.framework.TestCase.WrappedException
 
Field Summary
 
Fields inherited from class edu.rice.cs.drjava.model.definitions.indent.IndentRulesTestCase
_doc, TEST_INDENT_LEVEL
 
Constructor Summary
QuestionLineContainsTest()
           
 
Method Summary
 void testLineContainsColon()
          Ensures that a line containing a colon is detected.
 void testLineDoesNotContainColon()
          Ensures that a line containing a colon is detected.
 void testLineDoesNotContainColonDueToComments()
          Ensures that a line containing a colon is detected.
 void testLineDoesNotContainColonDueToQuotes()
          Ensures that a line containing a colon is detected.
 
Methods inherited from class edu.rice.cs.drjava.model.definitions.indent.IndentRulesTestCase
_assertContents, _setDocText, setUp, tearDown
 
Methods inherited from class edu.rice.cs.drjava.DrJavaTestCase
setConfigSetting, setDocText
 
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
 

Constructor Detail

QuestionLineContainsTest

public QuestionLineContainsTest()
Method Detail

testLineContainsColon

public void testLineContainsColon()
                           throws BadLocationException
Ensures that a line containing a colon is detected. Tests that a line of text containing a colon is detected.

Throws:
BadLocationException

testLineDoesNotContainColon

public void testLineDoesNotContainColon()
                                 throws BadLocationException
Ensures that a line containing a colon is detected. Tests that a line does not contain a colon.

Throws:
BadLocationException

testLineDoesNotContainColonDueToComments

public void testLineDoesNotContainColonDueToComments()
                                              throws BadLocationException
Ensures that a line containing a colon is detected. Tests that a line containing a commented out colon is identified as a line that does not contain a colon.

Throws:
BadLocationException

testLineDoesNotContainColonDueToQuotes

public void testLineDoesNotContainColonDueToQuotes()
                                            throws BadLocationException
Ensures that a line containing a colon is detected. Tests that a line containing a colon in quotes is identified as a line that does not contain a colon.

Throws:
BadLocationException