| javax.swing.text.DefaultStyledDocument_ElementBuffer_Specs2Test
DefaultStyledDocument_ElementBuffer_Specs2Test | public class DefaultStyledDocument_ElementBuffer_Specs2Test extends TestCase implements DocumentListener(Code) | | Tests DefaultStyledDocument class, in particular which ElementSpecs are
created during insertString with different parameters.
These tests insert some text into document containing following text
"first\nsecond\nthird" plus implied newline character.
Thus document has three paragraphs (Branch)
with one content (Leaf) under each paragraph.
Except for the above, this test-case is similar to
DefaultStyledDocument_ElementBuffer_Spec1Test .
The text is inserted into leaf of modifiedIndex at
offset insertOffset . By default modifiedIndex = 1
(the second paragraph), and offset is two chars to the right from the start,
i.e. the text is inserted after "se" .
Tests are classified as follows:
- 0x
- No attributes are set or passed as parameters.
- 1x
- The paragraph contains
bold attributes;
the text is inserted with null
as attrs parameter.
- 2x
- The character attributes set to
bold ;
the text is inserted with null
as attrs parameter.
- 3x
- No attributes are set;
the text is inserted with
italic attributes.
- 4x
- The paragraph contains
bold attributes;
the text is inserted with italic attributes.
- 5x
- The character attributes set to
bold ;
the text is inserted with italic attributes.
Each test-case region currently contains four tests.
|
Method Summary | |
public void | changedUpdate(DocumentEvent e) | public void | insertUpdate(DocumentEvent e) | public void | removeUpdate(DocumentEvent e) | protected void | setUp() | public void | testInsertString01() No attributes, text 'one', doc is empty. | public void | testInsertString02() No attributes, text 'one\n', doc is empty. | public void | testInsertString03() No attributes, text '\none', doc is empty. | public void | testInsertString04() No attributes, text 'one\ntwo', doc is empty. | public void | testInsertString11() Bold attribute on paragraph, text 'one' with no attributes, doc is empty. | public void | testInsertString12() Bold attribute on paragraph, text 'one\n' with no attributes, doc is
empty. | public void | testInsertString13() Bold attribute on paragraph, text '\none' with no attributes, doc is
empty. | public void | testInsertString14() Bold attribute on paragraph, text 'one\ntwo' with no attributes, doc is
empty. | public void | testInsertString21() Bold attribute on character, text 'one' with no attributes, doc is empty. | public void | testInsertString22() Bold attribute on character, text 'one\n' with no attributes, doc is
empty. | public void | testInsertString23() Bold attribute on character, text '\none' with no attributes, doc is
empty. | public void | testInsertString24() Bold attribute on character, text 'one\ntwo' with no attributes, doc is
empty. | public void | testInsertString31() No attributes, text 'one' with italic, doc is empty. | public void | testInsertString32() No attributes, text 'one\n' with italic, doc is empty. | public void | testInsertString33() No attributes, text '\none' with italic, doc is empty. | public void | testInsertString34() No attributes, text 'one\ntwo' with italic, doc is empty. | public void | testInsertString41() Bold attribute on paragraph, text 'one' with italic, doc is empty. | public void | testInsertString42() Bold attribute on paragraph, text 'one\n' with italic, doc is empty. | public void | testInsertString43() Bold attribute on paragraph, text '\none' with italic, doc is empty. | public void | testInsertString44() Bold attribute on paragraph, text 'one\ntwo' with italic, doc is empty. | public void | testInsertString51() Bold attribute on character, text 'one' with italic, doc is empty. | public void | testInsertString52() Bold attribute on character, text 'one\n' with italic, doc is empty. | public void | testInsertString53() Bold attribute on character, text '\none' with italic, doc is empty. | public void | testInsertString54() Bold attribute on character, text 'one\ntwo' with italic, doc is empty. |
testInsertString01 | public void testInsertString01() throws Exception(Code) | | No attributes, text 'one', doc is empty.
|
testInsertString02 | public void testInsertString02() throws Exception(Code) | | No attributes, text 'one\n', doc is empty.
|
testInsertString03 | public void testInsertString03() throws Exception(Code) | | No attributes, text '\none', doc is empty.
|
testInsertString04 | public void testInsertString04() throws Exception(Code) | | No attributes, text 'one\ntwo', doc is empty.
|
testInsertString11 | public void testInsertString11() throws Exception(Code) | | Bold attribute on paragraph, text 'one' with no attributes, doc is empty.
|
testInsertString12 | public void testInsertString12() throws Exception(Code) | | Bold attribute on paragraph, text 'one\n' with no attributes, doc is
empty.
|
testInsertString13 | public void testInsertString13() throws Exception(Code) | | Bold attribute on paragraph, text '\none' with no attributes, doc is
empty.
|
testInsertString14 | public void testInsertString14() throws Exception(Code) | | Bold attribute on paragraph, text 'one\ntwo' with no attributes, doc is
empty.
|
testInsertString21 | public void testInsertString21() throws Exception(Code) | | Bold attribute on character, text 'one' with no attributes, doc is empty.
|
testInsertString22 | public void testInsertString22() throws Exception(Code) | | Bold attribute on character, text 'one\n' with no attributes, doc is
empty.
|
testInsertString23 | public void testInsertString23() throws Exception(Code) | | Bold attribute on character, text '\none' with no attributes, doc is
empty.
|
testInsertString24 | public void testInsertString24() throws Exception(Code) | | Bold attribute on character, text 'one\ntwo' with no attributes, doc is
empty.
|
testInsertString31 | public void testInsertString31() throws Exception(Code) | | No attributes, text 'one' with italic, doc is empty.
|
testInsertString32 | public void testInsertString32() throws Exception(Code) | | No attributes, text 'one\n' with italic, doc is empty.
|
testInsertString33 | public void testInsertString33() throws Exception(Code) | | No attributes, text '\none' with italic, doc is empty.
|
testInsertString34 | public void testInsertString34() throws Exception(Code) | | No attributes, text 'one\ntwo' with italic, doc is empty.
|
testInsertString41 | public void testInsertString41() throws Exception(Code) | | Bold attribute on paragraph, text 'one' with italic, doc is empty.
|
testInsertString42 | public void testInsertString42() throws Exception(Code) | | Bold attribute on paragraph, text 'one\n' with italic, doc is empty.
|
testInsertString43 | public void testInsertString43() throws Exception(Code) | | Bold attribute on paragraph, text '\none' with italic, doc is empty.
|
testInsertString44 | public void testInsertString44() throws Exception(Code) | | Bold attribute on paragraph, text 'one\ntwo' with italic, doc is empty.
|
testInsertString51 | public void testInsertString51() throws Exception(Code) | | Bold attribute on character, text 'one' with italic, doc is empty.
|
testInsertString52 | public void testInsertString52() throws Exception(Code) | | Bold attribute on character, text 'one\n' with italic, doc is empty.
|
testInsertString53 | public void testInsertString53() throws Exception(Code) | | Bold attribute on character, text '\none' with italic, doc is empty.
|
testInsertString54 | public void testInsertString54() throws Exception(Code) | | Bold attribute on character, text 'one\ntwo' with italic, doc is empty.
|
|
|