use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testImageWithEmptyAttributes.
@Test
public void testImageWithEmptyAttributes() {
builder.beginDocument();
builder.image(new Attributes(), "/path/to/img.jpg");
builder.endDocument();
assertMarkup("image:/path/to/img.jpg[]\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testSpanSimple.
@Test
public void testSpanSimple() {
builder.beginDocument();
builder.characters("Here's a ");
builder.beginSpan(SpanType.SPAN, new Attributes());
builder.characters("plain");
builder.endSpan();
builder.characters(" span.");
builder.endBlock();
assertMarkup("Here's a plain span.\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testUnsupportedSpan.
@Test
public void testUnsupportedSpan() {
builder.beginDocument();
builder.beginSpan(SpanType.UNDERLINED, new Attributes());
builder.characters("unsupported");
builder.endSpan();
builder.endDocument();
assertMarkup("unsupported\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testSpanImplicitParagraph.
@Test
public void testSpanImplicitParagraph() {
builder.beginDocument();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("Paragraph");
builder.endBlock();
builder.beginSpan(SpanType.ITALIC, new Attributes());
builder.characters("Implicit");
builder.endSpan();
builder.characters(" paragraph");
builder.endDocument();
assertMarkup("Paragraph\n\n_Implicit_ paragraph\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testListBulleted.
@Test
public void testListBulleted() {
builder.beginDocument();
builder.beginBlock(BlockType.BULLETED_LIST, new Attributes());
builder.beginBlock(BlockType.LIST_ITEM, new Attributes());
builder.characters("X");
builder.endBlock();
builder.beginBlock(BlockType.LIST_ITEM, new Attributes());
builder.characters("Y");
builder.endBlock();
builder.beginBlock(BlockType.LIST_ITEM, new Attributes());
builder.characters("Z");
builder.endBlock();
builder.endBlock();
builder.endDocument();
assertMarkup("* X\n* Y\n* Z\n");
}
Aggregations