edu.rice.cs.drjava.model.definitions.indent
Class IndentRulesTestCase
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
edu.rice.cs.drjava.DrJavaTestCase
edu.rice.cs.drjava.model.definitions.indent.IndentRulesTestCase
- All Implemented Interfaces:
- Test
- Direct Known Subclasses:
- ActionBracePlusTest, ActionDoNothingTest, ActionStartPrevLinePlusMultilinePreserveTest, ActionStartPrevLinePlusTest, ActionStartPrevStmtPlusTest, ActionStartStmtOfBracePlusTest, IndentHelperTest, IndentRuleWithTraceTest, QuestionBraceIsCurlyTest, QuestionBraceIsParenOrBracketTest, QuestionCurrLineEmptyOrEnterPressTest, QuestionCurrLineIsWingCommentTest, QuestionCurrLineStartsWithSkipCommentsTest, QuestionCurrLineStartsWithTest, QuestionExistsCharInStmtTest, QuestionHasCharPrecedingOpenBraceTest, QuestionInsideCommentTest, QuestionLineContainsTest, QuestionNewParenPhraseTest, QuestionPrevLineStartsCommentTest, QuestionPrevLineStartsWithTest, QuestionStartAfterOpenBraceTest, QuestionStartingNewStmtTest
public abstract class IndentRulesTestCase
- extends DrJavaTestCase
Superclass for all test classes for the indentation decision tree.
- Version:
- $Id: IndentRulesTestCase.java 4691 2008-12-02 23:33:27Z dlsmith $
Method Summary |
protected void |
_assertContents(String expected)
Asserts that the document contains the expected text. |
protected void |
_setDocText(String text)
Clears the text of the _doc field and sets it to the given string. |
void |
setUp()
Sets up the test environment. |
void |
tearDown()
Clean up for every test case. |
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 |
TEST_INDENT_LEVEL
public static final int TEST_INDENT_LEVEL
- See Also:
- Constant Field Values
_doc
protected volatile AbstractDJDocument _doc
IndentRulesTestCase
public IndentRulesTestCase()
setUp
public void setUp()
throws Exception
- Sets up the test environment.
- Overrides:
setUp
in class DrJavaTestCase
- Throws:
Exception
- This convention is mandated by JUnit.TestCase, the superclass of this class.
tearDown
public void tearDown()
throws Exception
- Description copied from class:
DrJavaTestCase
- Clean up for every test case. Only used in unit tests. Added because Windows would intermittently throw
a java.util.concurrent.RejectedExecutionException during cleanup.
- Overrides:
tearDown
in class DrJavaTestCase
- Throws:
Exception
_setDocText
protected final void _setDocText(String text)
throws BadLocationException
- Clears the text of the _doc field and sets it to the given string.
- Throws:
BadLocationException
_assertContents
protected void _assertContents(String expected)
throws BadLocationException
- Asserts that the document contains the expected text.
- Parameters:
expected
- what text of document should be
- Throws:
BadLocationException