use of org.eclipse.mylyn.wikitext.html.internal.SubstitutionSpanStrategy in project mylyn.docs by eclipse.
the class SpanStrategiesTest method alternatives.
@Test
public void alternatives() {
SpanStrategies strategies = new SpanStrategies(Sets.newHashSet(SpanType.BOLD), Collections.<SpanHtmlElementStrategy>emptyList());
assertTrue(strategies.getStrategy(SpanType.STRONG, new Attributes()) instanceof SubstitutionSpanStrategy);
}
use of org.eclipse.mylyn.wikitext.html.internal.SubstitutionSpanStrategy in project mylyn.docs by eclipse.
the class SubstitutionSpanStrategyTest method substitution.
@Test
public void substitution() {
SubstitutionSpanStrategy strategy = new SubstitutionSpanStrategy(SpanType.BOLD);
strategy.beginSpan(builder, SpanType.CODE, new Attributes());
builder.characters("test");
strategy.endSpan(builder);
assertEquals("<b>test</b>", writer.toString());
}
Aggregations