use of org.eclipse.mylyn.wikitext.parser.css.ElementInfo in project mylyn.docs by eclipse.
the class HtmlTextPresentationParserTest method assertDefaultCssStyles.
private void assertDefaultCssStyles(String expectedStyles, final String elementName) {
Stylesheet stylesheet = defaultStylesheet();
final List<String> styles = new ArrayList<>();
Receiver receiver = new Receiver() {
@Override
public void apply(CssRule rule) {
styles.add(rule.name + ": " + rule.value);
}
};
stylesheet.applyTo(new ElementInfo() {
@Override
public boolean hasId(String id) {
return false;
}
@Override
public boolean hasCssClass(String cssClass) {
return false;
}
@Override
public ElementInfo getParent() {
return null;
}
@Override
public String getLocalName() {
return elementName;
}
}, receiver);
assertEquals("element " + elementName, expectedStyles, Joiner.on("; ").join(styles));
}
Aggregations