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

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

public final class QuestionCurrLineStartsWithTest
extends IndentRulesTestCase

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

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

Nested Class Summary
 
Nested classes/interfaces inherited from class junit.framework.TestCase
TestCase.WrappedException
 
Field Summary
 
Fields inherited from class edu.rice.cs.drjava.model.definitions.indent.IndentRulesTestCase
_doc, TEST_INDENT_LEVEL
 
Constructor Summary
QuestionCurrLineStartsWithTest()
           
 
Method Summary
 void testCommentedPrefixDontSearchComment()
          Tests having a commented prefix without searching in comments.
 void testCommentedPrefixSearchComment()
          Tests having a commented prefix with searching in comments.
 void testDoesNotStartWithPrefix()
          Tests having text on a line before the prefix.
 void testMultCharPrefix()
          Tests multiple-character prefix.
 void testMultipleCharPrefix()
          Tests having a multiple character prefix.
 void testNoPrefix()
          Tests not having the prefix in the text.
 void testPrefixAtEnd()
          Prefix appears at the end of a document.
 void testStartsWithPrefixNoText()
          Tests having a line start with prefix, with no text following
 void testStartsWithPrefixWithText()
          Tests having a 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

QuestionCurrLineStartsWithTest

public QuestionCurrLineStartsWithTest()
Method Detail

testNoPrefix

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

Throws:
javax.swing.text.BadLocationException

testStartsWithPrefixWithText

public void testStartsWithPrefixWithText()
                                  throws javax.swing.text.BadLocationException
Tests having a line start with prefix, with text following

Throws:
javax.swing.text.BadLocationException

testStartsWithPrefixNoText

public void testStartsWithPrefixNoText()
                                throws javax.swing.text.BadLocationException
Tests having a line start with prefix, with no text following

Throws:
javax.swing.text.BadLocationException

testMultipleCharPrefix

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

Throws:
javax.swing.text.BadLocationException

testCommentedPrefixDontSearchComment

public void testCommentedPrefixDontSearchComment()
                                          throws javax.swing.text.BadLocationException
Tests having a commented prefix without searching in comments.

Throws:
javax.swing.text.BadLocationException

testCommentedPrefixSearchComment

public void testCommentedPrefixSearchComment()
                                      throws javax.swing.text.BadLocationException
Tests having a commented prefix with searching in comments.

Throws:
javax.swing.text.BadLocationException

testDoesNotStartWithPrefix

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

Throws:
javax.swing.text.BadLocationException

testPrefixAtEnd

public void testPrefixAtEnd()
                     throws javax.swing.text.BadLocationException
Prefix appears at the end of a document.

Throws:
javax.swing.text.BadLocationException

testMultCharPrefix

public void testMultCharPrefix()
                        throws javax.swing.text.BadLocationException
Tests multiple-character prefix.

Throws:
javax.swing.text.BadLocationException