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

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--edu.rice.cs.drjava.model.definitions.indent.IndentRulesTestCase
                    |
                    +--edu.rice.cs.drjava.model.definitions.indent.QuestionPrevLineStartsWithTest
All Implemented Interfaces:
Test

public class QuestionPrevLineStartsWithTest
extends IndentRulesTestCase

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

Version:
$Id: QuestionPrevLineStartsWithTest.java,v 1.2 2002/03/20 18:33:11 csreis Exp $

Fields inherited from class edu.rice.cs.drjava.model.definitions.indent.IndentRulesTestCase
_doc, _indent
 
Fields inherited from class junit.framework.TestCase
fName
 
Constructor Summary
QuestionPrevLineStartsWithTest(String name)
          Tests the indentation decision tree.
 
Method Summary
 void testCommentedPrefix()
          Tests having a commented prefix.
 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
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

QuestionPrevLineStartsWithTest

public QuestionPrevLineStartsWithTest(String name)
Tests the indentation decision tree.
Method Detail

testNoPrefix

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

testStartOfDocument

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

testPrefixOnCurrLine

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

testStartsWithPrefixWithText

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

testStartsWithPrefixNoText

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

testMultipleCharPrefix

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

testCommentedPrefix

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

testDoesNotStartWithPrefix

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