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

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

public class ActionStartPrevLinePlusMultilinePreserveTest
extends IndentRulesTestCase

Tests ActionStartPrevLinePlusMultilinePreserve(String,int,int,int,int). It specifically tests the behavior of the auto-closing comments feature. This means it tests cases where the user has just hit ENTER somewhere on the opening line of a block comment.

Version:
$Id: ActionStartPrevLinePlusMultilinePreserveTest.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
ActionStartPrevLinePlusMultilinePreserveTest()
           
 
Method Summary
 void helperCommentTest(java.lang.String start, int loc, int endLoc, java.lang.String finish)
          This method abstracts the common behavior in subsequent tests.
private  IndentRuleAction makeAction(java.lang.String[] suffices, int cursorLine, int cursorPos, int psrvLine, int psrvPos)
          A factory method that constructs the specified instance of IndentRuleAction.
 void test1()
           
 void test10()
           
 void test11()
           
 void test2()
           
 void test3()
           
 void test4()
           
 void test5()
           
 void test6()
           
 void test7()
           
 void test8()
           
 void xtest9()
           
 
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

ActionStartPrevLinePlusMultilinePreserveTest

public ActionStartPrevLinePlusMultilinePreserveTest()
Method Detail

makeAction

private IndentRuleAction makeAction(java.lang.String[] suffices,
                                    int cursorLine,
                                    int cursorPos,
                                    int psrvLine,
                                    int psrvPos)
A factory method that constructs the specified instance of IndentRuleAction. @see ActionStartPrevLinePlusMultilinePreserve#ActionStartPrevLinePlusMultilinePreserve(String[], int, int, int, int)


helperCommentTest

public void helperCommentTest(java.lang.String start,
                              int loc,
                              int endLoc,
                              java.lang.String finish)
                       throws javax.swing.text.BadLocationException
This method abstracts the common behavior in subsequent tests.

Parameters:
start - The text that should be in the document at time rule is called
loc - the location of the cursor when rule is called
endLoc - the expected final size of the document
finish - the text string that remaining after the rule is called
Throws:
javax.swing.text.BadLocationException

test1

public void test1()
           throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

test2

public void test2()
           throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

test3

public void test3()
           throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

test4

public void test4()
           throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

test5

public void test5()
           throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

test6

public void test6()
           throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

test7

public void test7()
           throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

test8

public void test8()
           throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

xtest9

public void xtest9()
            throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

test10

public void test10()
            throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

test11

public void test11()
            throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException