assertEquals(4, stpb.getParagraphStyles().size());
}
public void testCharacterStyleLengths() throws Exception {
StyleTextPropAtom stpa = new StyleTextPropAtom(data_a,0,data_a.length);
StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
// Set for the appropriate text sizes
stpa.setParentTextSize(data_a_text_len);
stpb.setParentTextSize(data_b_text_len);
// 54 chars, 21 + 17 + 16
LinkedList a_ch_l = stpa.getCharacterStyles();
TextPropCollection a_ch_1 = (TextPropCollection)a_ch_l.get(0);
TextPropCollection a_ch_2 = (TextPropCollection)a_ch_l.get(1);
TextPropCollection a_ch_3 = (TextPropCollection)a_ch_l.get(2);
assertEquals(21, a_ch_1.getCharactersCovered());
assertEquals(17, a_ch_2.getCharactersCovered());
assertEquals(16, a_ch_3.getCharactersCovered());
// 179 chars, 30 + 28 + 25
LinkedList b_ch_l = stpb.getCharacterStyles();
TextPropCollection b_ch_1 = (TextPropCollection)b_ch_l.get(0);
TextPropCollection b_ch_2 = (TextPropCollection)b_ch_l.get(1);
TextPropCollection b_ch_3 = (TextPropCollection)b_ch_l.get(2);
TextPropCollection b_ch_4 = (TextPropCollection)b_ch_l.get(3);
assertEquals(30, b_ch_1.getCharactersCovered());