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);
// 1st is bold
CharFlagsTextProp cf_1_1 = (CharFlagsTextProp)b_ch_1.getTextPropList().get(0);
assertEquals(true,cf_1_1.getSubValue(CharFlagsTextProp.BOLD_IDX));
assertEquals(false,cf_1_1.getSubValue(CharFlagsTextProp.ITALIC_IDX));
assertEquals(false,cf_1_1.getSubValue(CharFlagsTextProp.ENABLE_NUMBERING_1_IDX));
assertEquals(false,cf_1_1.getSubValue(CharFlagsTextProp.ENABLE_NUMBERING_2_IDX));
assertEquals(false,cf_1_1.getSubValue(CharFlagsTextProp.RELIEF_IDX));
assertEquals(false,cf_1_1.getSubValue(CharFlagsTextProp.RESET_NUMBERING_IDX));
assertEquals(false,cf_1_1.getSubValue(CharFlagsTextProp.SHADOW_IDX));
assertEquals(false,cf_1_1.getSubValue(CharFlagsTextProp.STRIKETHROUGH_IDX));
assertEquals(false,cf_1_1.getSubValue(CharFlagsTextProp.UNDERLINE_IDX));
// 2nd is italic
CharFlagsTextProp cf_2_1 = (CharFlagsTextProp)b_ch_2.getTextPropList().get(0);
assertEquals(false,cf_2_1.getSubValue(CharFlagsTextProp.BOLD_IDX));
assertEquals(true,cf_2_1.getSubValue(CharFlagsTextProp.ITALIC_IDX));
assertEquals(false,cf_2_1.getSubValue(CharFlagsTextProp.ENABLE_NUMBERING_1_IDX));
assertEquals(false,cf_2_1.getSubValue(CharFlagsTextProp.ENABLE_NUMBERING_2_IDX));
assertEquals(false,cf_2_1.getSubValue(CharFlagsTextProp.RELIEF_IDX));
assertEquals(false,cf_2_1.getSubValue(CharFlagsTextProp.RESET_NUMBERING_IDX));
assertEquals(false,cf_2_1.getSubValue(CharFlagsTextProp.SHADOW_IDX));
assertEquals(false,cf_2_1.getSubValue(CharFlagsTextProp.STRIKETHROUGH_IDX));
assertEquals(false,cf_2_1.getSubValue(CharFlagsTextProp.UNDERLINE_IDX));
// 3rd is normal, so lacks a CharFlagsTextProp
assertFalse(b_ch_3.getTextPropList().get(0) instanceof CharFlagsTextProp);
// 4th is underlined
CharFlagsTextProp cf_4_1 = (CharFlagsTextProp)b_ch_4.getTextPropList().get(0);
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.BOLD_IDX));
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.ITALIC_IDX));
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.ENABLE_NUMBERING_1_IDX));
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.ENABLE_NUMBERING_2_IDX));
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.RELIEF_IDX));
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.RESET_NUMBERING_IDX));
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.SHADOW_IDX));
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.STRIKETHROUGH_IDX));
assertEquals(true,cf_4_1.getSubValue(CharFlagsTextProp.UNDERLINE_IDX));
// The value for this should be 4
assertEquals(0x0004, cf_4_1.getValue());
// Now make the 4th bold, italic and not underlined
cf_4_1.setSubValue(true, CharFlagsTextProp.BOLD_IDX);
cf_4_1.setSubValue(true, CharFlagsTextProp.ITALIC_IDX);
cf_4_1.setSubValue(false, CharFlagsTextProp.UNDERLINE_IDX);
assertEquals(true,cf_4_1.getSubValue(CharFlagsTextProp.BOLD_IDX));
assertEquals(true,cf_4_1.getSubValue(CharFlagsTextProp.ITALIC_IDX));
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.ENABLE_NUMBERING_1_IDX));
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.ENABLE_NUMBERING_2_IDX));
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.RELIEF_IDX));
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.RESET_NUMBERING_IDX));
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.SHADOW_IDX));
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.STRIKETHROUGH_IDX));
assertEquals(false,cf_4_1.getSubValue(CharFlagsTextProp.UNDERLINE_IDX));
// The value should now be 3
assertEquals(0x0003, cf_4_1.getValue());
}