use of org.eclipse.mylyn.wikitext.parser.builder.event.BeginSpanEvent in project mylyn.docs by eclipse.
the class MultiplexingDocumentBuilderTest method beginSpan.
@Test
public void beginSpan() {
multiplexer.beginSpan(SpanType.DELETED, new Attributes());
assertEvents(new BeginSpanEvent(SpanType.DELETED, new Attributes()));
}
use of org.eclipse.mylyn.wikitext.parser.builder.event.BeginSpanEvent in project mylyn.docs by eclipse.
the class BeginSpanEventTest method equals.
@Test
public void equals() {
assertEquality(new BeginSpanEvent(SpanType.CODE, new Attributes()), new BeginSpanEvent(SpanType.CODE, new Attributes()));
assertInequality(new BeginSpanEvent(SpanType.CODE, new Attributes()), new BeginSpanEvent(SpanType.BOLD, new Attributes()));
}
use of org.eclipse.mylyn.wikitext.parser.builder.event.BeginSpanEvent in project mylyn.docs by eclipse.
the class SubstitutionWithoutCssSpanStrategyTest method test.
@Test
public void test() {
SubstitutionWithoutCssSpanStrategy strategy = new SubstitutionWithoutCssSpanStrategy(SpanType.BOLD);
EventDocumentBuilder builder = new EventDocumentBuilder();
strategy.beginSpan(builder, SpanType.ITALIC, new Attributes("1", "class", "style", "lang"));
List<DocumentBuilderEvent> events = builder.getDocumentBuilderEvents().getEvents();
assertEquals(ImmutableList.of(new BeginSpanEvent(SpanType.BOLD, new Attributes("1", "class", null, "lang"))), events);
}
use of org.eclipse.mylyn.wikitext.parser.builder.event.BeginSpanEvent 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.BeginSpanEvent in project mylyn.docs by eclipse.
the class EventDocumentBuilderTest method beginSpan.
@Test
public void beginSpan() {
builder.beginSpan(SpanType.DELETED, new Attributes());
assertEvents(new BeginSpanEvent(SpanType.DELETED, new Attributes()));
}
Aggregations