use of org.eclipse.mylyn.wikitext.parser.builder.event.BeginBlockEvent in project mylyn.docs by eclipse.
the class EventDocumentBuilderTest method beginBlock.
@Test
public void beginBlock() {
builder.beginBlock(BlockType.PREFORMATTED, new Attributes());
assertEvents(new BeginBlockEvent(BlockType.PREFORMATTED, new Attributes()));
}
use of org.eclipse.mylyn.wikitext.parser.builder.event.BeginBlockEvent 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());
}
use of org.eclipse.mylyn.wikitext.parser.builder.event.BeginBlockEvent in project mylyn.docs by eclipse.
the class BeginBlockEventTest method equals.
@Test
public void equals() {
assertEquality(new BeginBlockEvent(BlockType.CODE, new Attributes()), new BeginBlockEvent(BlockType.CODE, new Attributes()));
assertInequality(new BeginBlockEvent(BlockType.CODE, new Attributes()), new BeginBlockEvent(BlockType.BULLETED_LIST, new Attributes()));
assertInequality(new BeginBlockEvent(BlockType.CODE, new Attributes()), new BeginBlockEvent(BlockType.PREFORMATTED, new Attributes()));
}
use of org.eclipse.mylyn.wikitext.parser.builder.event.BeginBlockEvent in project mylyn.docs by eclipse.
the class MultiplexingDocumentBuilderTest method beginBlock.
@Test
public void beginBlock() {
multiplexer.beginBlock(BlockType.PREFORMATTED, new Attributes());
assertEvents(new BeginBlockEvent(BlockType.PREFORMATTED, new Attributes()));
}
Aggregations