public void testFlush_Insert_PushPopTag_ApplicationMoment2() throws Exception { SimpleAttributeSet attr = new SimpleAttributeSet(); reader = (HTMLReader)doc.getReader(-100, 10, 100, Tag.I); reader.registerTag(Tag.I, reader.new TagAction()); reader.handleStartTag(Tag.I, new SimpleAttributeSet(), 1000); reader.handleSimpleTag(Tag.I, new SimpleAttributeSet(), 1000); reader.handleSimpleTag(Tag.BR, new SimpleAttributeSet(), 1000); assertEquals(0, reader.parseBuffer.size()); }
public void testAddContent_BlockOpenClose_P_Implied5() { TagAction action = reader.new ParagraphAction(); reader.handleStartTag(Tag.BODY, new SimpleAttributeSet(), 0); assertEquals(1, reader.parseBuffer.size()); reader.handleText("0000".toCharArray(), 0); assertEquals(3, reader.parseBuffer.size()); action.start(Tag.P, new SimpleAttributeSet()); assertEquals(6, reader.parseBuffer.size()); reader.handleText("1111".toCharArray(), 0); assertEquals(7, reader.parseBuffer.size()); action.end(Tag.P); assertEquals(9, reader.parseBuffer.size()); }