use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testLinkWithEmptyAttributes.
@Test
public void testLinkWithEmptyAttributes() {
builder.beginDocument();
builder.characters("This is ");
builder.link(new Attributes(), "http://example.com/", "an example");
builder.characters(" inline link.");
builder.endDocument();
assertMarkup("This is link:http://example.com/[an example] inline link.\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testBold.
@Test
public void testBold() {
builder.beginDocument();
builder.beginSpan(SpanType.BOLD, new Attributes());
builder.characters("bold");
builder.endSpan();
builder.endDocument();
assertMarkup("*bold*\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testParagraphWithStrongEmphasis.
@Test
public void testParagraphWithStrongEmphasis() {
builder.beginDocument();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("some ");
builder.beginSpan(SpanType.STRONG, new Attributes());
builder.characters("strong");
builder.endSpan();
builder.characters(" and ");
builder.beginSpan(SpanType.EMPHASIS, new Attributes());
builder.characters("emphasis");
builder.endSpan();
builder.endBlock();
builder.endDocument();
assertMarkup("some *strong* and _emphasis_\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testItalic.
@Test
public void testItalic() {
builder.beginDocument();
builder.beginSpan(SpanType.ITALIC, new Attributes());
builder.characters("italic");
builder.endSpan();
builder.endDocument();
assertMarkup("_italic_\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testSubscript.
@Test
public void testSubscript() {
builder.beginDocument();
builder.beginSpan(SpanType.SUBSCRIPT, new Attributes());
builder.characters("subscript");
builder.endSpan();
builder.endDocument();
assertMarkup("~subscript~\n\n");
}
Aggregations