use of org.eclipse.mylyn.wikitext.parser.builder.event.EndBlockEvent in project mylyn.docs by eclipse.
the class EventDocumentBuilderTest method endBlock.
@Test
public void endBlock() {
builder.endBlock();
assertEvents(new EndBlockEvent());
}
use of org.eclipse.mylyn.wikitext.parser.builder.event.EndBlockEvent in project mylyn.docs by eclipse.
the class MultiplexingDocumentBuilderTest method endBlock.
@Test
public void endBlock() {
multiplexer.endBlock();
assertEvents(new EndBlockEvent());
}
use of org.eclipse.mylyn.wikitext.parser.builder.event.EndBlockEvent in project mylyn.docs by eclipse.
the class SourceBlocksTest method process.
@Test
public void process() {
EventDocumentBuilder builder = new EventDocumentBuilder();
sourceBlocks.process(ProcessingContext.builder().build(), builder, LineSequence.create("one\nb2\nmore\n\nb1 and\n\n\nb2"));
ImmutableList<DocumentBuilderEvent> expectedEvents = //
ImmutableList.of(//
new BeginBlockEvent(BlockType.PARAGRAPH, new Attributes()), //
new CharactersEvent("b2"), //
new CharactersEvent("more"), //
new EndBlockEvent(), //
new BeginBlockEvent(BlockType.QUOTE, new Attributes()), //
new CharactersEvent("b1 and"), //
new EndBlockEvent(), //
new BeginBlockEvent(BlockType.PARAGRAPH, new Attributes()), //
new CharactersEvent("b2"), new EndBlockEvent());
assertEquals(Joiner.on("\n").join(builder.getDocumentBuilderEvents().getEvents()), expectedEvents, builder.getDocumentBuilderEvents().getEvents());
}
Aggregations