use of org.eclipse.mylyn.wikitext.html.internal.SpanStrategies in project mylyn.docs by eclipse.
the class SpanStrategiesTest method spanWithUnrecognizedCssToUnsupported.
@Test
public void spanWithUnrecognizedCssToUnsupported() {
SpanStrategies strategies = new SpanStrategies(Sets.newHashSet(SpanType.BOLD), Collections.<SpanHtmlElementStrategy>emptyList());
assertTrue(strategies.getStrategy(SpanType.SPAN, new Attributes(null, null, "font-weight:unknown", null)) instanceof UnsupportedSpanStrategy);
}
use of org.eclipse.mylyn.wikitext.html.internal.SpanStrategies in project mylyn.docs by eclipse.
the class SpanStrategiesTest method spanWithTextDecorationUnderlineToUnderlined.
@Test
public void spanWithTextDecorationUnderlineToUnderlined() {
SpanStrategies strategies = new SpanStrategies(Sets.newHashSet(SpanType.UNDERLINED), Collections.<SpanHtmlElementStrategy>emptyList());
SpanStrategy strategy = strategies.getStrategy(SpanType.SPAN, new Attributes(null, null, "text-decoration: underline;", null));
assertTrue(strategy instanceof SubstitutionWithoutCssSpanStrategy);
assertEquals(SpanType.UNDERLINED, ((SubstitutionWithoutCssSpanStrategy) strategy).getType());
}
use of org.eclipse.mylyn.wikitext.html.internal.SpanStrategies 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.SpanStrategies in project mylyn.docs by eclipse.
the class SpanStrategiesTest method spanWithFontWeightToBold.
@Test
public void spanWithFontWeightToBold() {
SpanStrategies strategies = new SpanStrategies(Sets.newHashSet(SpanType.BOLD), Collections.<SpanHtmlElementStrategy>emptyList());
SpanStrategy strategy = strategies.getStrategy(SpanType.SPAN, new Attributes(null, null, "font-weight: bold", null));
assertTrue(strategy instanceof SubstitutionWithoutCssSpanStrategy);
assertEquals(SpanType.BOLD, ((SubstitutionWithoutCssSpanStrategy) strategy).getType());
}
use of org.eclipse.mylyn.wikitext.html.internal.SpanStrategies in project mylyn.docs by eclipse.
the class SpanStrategiesTest method spanWithFontWeightToStrong.
@Test
public void spanWithFontWeightToStrong() {
SpanStrategies strategies = new SpanStrategies(Sets.newHashSet(SpanType.STRONG), Collections.<SpanHtmlElementStrategy>emptyList());
SpanStrategy strategy = strategies.getStrategy(SpanType.SPAN, new Attributes(null, null, "font-weight: bold", null));
assertTrue(strategy instanceof SubstitutionWithoutCssSpanStrategy);
assertEquals(SpanType.STRONG, ((SubstitutionWithoutCssSpanStrategy) strategy).getType());
}
Aggregations