Tests DefaultStyledDocument class, in particular which ElementSpecs are
created during insertString with different parameters.
These tests insert some text into document containing one paragraph of
attributed text:
"plainbolditalic" plus implied newline character.
Thus document has one paragraph (Branch)
with three contents (Leaf) under the paragraph.
The text is inserted into leaf of leafIndex at
offset insertOffset . By default leafIndex = 1
(the second style run with bold attributes), and offset is two chars to
the right from the start, i.e. the text is inserted after "bo" .
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.
|