Search in sources :

Example 1 with EndBlockEvent

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());
}
Also used : EndBlockEvent(org.eclipse.mylyn.wikitext.parser.builder.event.EndBlockEvent) Test(org.junit.Test)

Example 2 with 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());
}
Also used : EndBlockEvent(org.eclipse.mylyn.wikitext.parser.builder.event.EndBlockEvent) Test(org.junit.Test)

Example 3 with 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());
}
Also used : DocumentBuilderEvent(org.eclipse.mylyn.wikitext.parser.builder.event.DocumentBuilderEvent) CharactersEvent(org.eclipse.mylyn.wikitext.parser.builder.event.CharactersEvent) EventDocumentBuilder(org.eclipse.mylyn.wikitext.parser.builder.EventDocumentBuilder) EndBlockEvent(org.eclipse.mylyn.wikitext.parser.builder.event.EndBlockEvent) BeginBlockEvent(org.eclipse.mylyn.wikitext.parser.builder.event.BeginBlockEvent) Attributes(org.eclipse.mylyn.wikitext.parser.Attributes) Test(org.junit.Test)

Aggregations

EndBlockEvent (org.eclipse.mylyn.wikitext.parser.builder.event.EndBlockEvent)3 Test (org.junit.Test)3 Attributes (org.eclipse.mylyn.wikitext.parser.Attributes)1 EventDocumentBuilder (org.eclipse.mylyn.wikitext.parser.builder.EventDocumentBuilder)1 BeginBlockEvent (org.eclipse.mylyn.wikitext.parser.builder.event.BeginBlockEvent)1 CharactersEvent (org.eclipse.mylyn.wikitext.parser.builder.event.CharactersEvent)1 DocumentBuilderEvent (org.eclipse.mylyn.wikitext.parser.builder.event.DocumentBuilderEvent)1