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

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

public final class QuestionPrevLineStartsWithTest
extends IndentRulesTestCase

Tests the indention rule which detects whether the immediately previous line starts with a particular string.

Version:
$Id: QuestionPrevLineStartsWithTest.java 4519 2008-06-15 07:14:29Z rcartwright $

Field Summary
 
Fields inherited from class edu.rice.cs.drjava.model.definitions.indent.IndentRulesTestCase
_doc, TEST_INDENT_LEVEL
 
Fields inherited from class edu.rice.cs.drjava.DrJavaTestCase
TEST_DRJAVA_CONFIG_PROPERTY
 
Constructor Summary
QuestionPrevLineStartsWithTest()
           
 
Method Summary
 void testCommentedPrefix()
          Tests having a commented prefix.
 void testCommentPrefix()
          Tests a prefix that begins a comment.
 void testDoesNotStartWithPrefix()
          Tests having text on a line before the prefix.
 void testMultipleCharPrefix()
          Tests having a multiple character prefix.
 void testNoPrefix()
          Tests not having the prefix in the text.
 void testPrefixOnCurrLine()
          Tests prefix on current line.
 void testStartOfDocument()
          Tests hitting start of document.
 void testStartsWithPrefixNoText()
          Tests having prev line start with prefix, with no text following
 void testStartsWithPrefixWithText()
          Tests having prev line start with prefix, with text following
 
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

QuestionPrevLineStartsWithTest

public QuestionPrevLineStartsWithTest()
Method Detail

testNoPrefix

public void testNoPrefix()
                  throws BadLocationException
Tests not having the prefix in the text.

Throws:
BadLocationException

testStartOfDocument

public void testStartOfDocument()
                         throws BadLocationException
Tests hitting start of document.

Throws:
BadLocationException

testPrefixOnCurrLine

public void testPrefixOnCurrLine()
                          throws BadLocationException
Tests prefix on current line.

Throws:
BadLocationException

testStartsWithPrefixWithText

public void testStartsWithPrefixWithText()
                                  throws BadLocationException
Tests having prev line start with prefix, with text following

Throws:
BadLocationException

testStartsWithPrefixNoText

public void testStartsWithPrefixNoText()
                                throws BadLocationException
Tests having prev line start with prefix, with no text following

Throws:
BadLocationException

testMultipleCharPrefix

public void testMultipleCharPrefix()
                            throws BadLocationException
Tests having a multiple character prefix.

Throws:
BadLocationException

testCommentedPrefix

public void testCommentedPrefix()
                         throws BadLocationException
Tests having a commented prefix.

Throws:
BadLocationException

testCommentPrefix

public void testCommentPrefix()
                       throws BadLocationException
Tests a prefix that begins a comment.

Throws:
BadLocationException

testDoesNotStartWithPrefix

public void testDoesNotStartWithPrefix()
                                throws BadLocationException
Tests having text on a line before the prefix.

Throws:
BadLocationException