use of org.eclipse.mylyn.wikitext.parser.builder.event.EndSpanEvent in project mylyn.docs by eclipse.
the class EventDocumentBuilderTest method endSpan.
@Test
public void endSpan() {
builder.endSpan();
assertEvents(new EndSpanEvent());
}
use of org.eclipse.mylyn.wikitext.parser.builder.event.EndSpanEvent in project mylyn.docs by eclipse.
the class CompositeSpanStrategyTest method test.
@Test
public void test() {
CompositeSpanStrategy strategy = new CompositeSpanStrategy(Lists.<SpanStrategy>newArrayList(new SubstitutionWithoutCssSpanStrategy(SpanType.BOLD), new SubstitutionWithoutCssSpanStrategy(SpanType.ITALIC)));
EventDocumentBuilder builder = new EventDocumentBuilder();
strategy.beginSpan(builder, SpanType.DELETED, new Attributes());
strategy.endSpan(builder);
DocumentBuilderEvents events = builder.getDocumentBuilderEvents();
assertEquals(ImmutableList.of(new BeginSpanEvent(SpanType.BOLD, new Attributes()), new BeginSpanEvent(SpanType.ITALIC, new Attributes()), new EndSpanEvent(), new EndSpanEvent()), events.getEvents());
}
use of org.eclipse.mylyn.wikitext.parser.builder.event.EndSpanEvent in project mylyn.docs by eclipse.
the class FontElementStrategyTest method spanStrategyBuildsNonHtml.
@Test
public void spanStrategyBuildsNonHtml() {
EventDocumentBuilder builder = new EventDocumentBuilder();
SpanStrategy spanStrategy = strategy.spanStrategy();
spanStrategy.beginSpan(builder, SpanType.SPAN, new Attributes(null, null, "color: red", null));
builder.characters("test");
spanStrategy.endSpan(builder);
assertEquals(Arrays.asList(new BeginSpanEvent(SpanType.SPAN, new Attributes(null, null, "color: red", null)), new CharactersEvent("test"), new EndSpanEvent()), builder.getDocumentBuilderEvents().getEvents());
}
use of org.eclipse.mylyn.wikitext.parser.builder.event.EndSpanEvent in project mylyn.docs by eclipse.
the class MultiplexingDocumentBuilderTest method endSpan.
@Test
public void endSpan() {
multiplexer.endSpan();
assertEvents(new EndSpanEvent());
}
Aggregations