use of org.eclipse.mylyn.wikitext.parser.ImageAttributes in project mylyn.docs by eclipse.
the class MarkdownDocumentBuilderTest method testImageImplicitParagraph.
public void testImageImplicitParagraph() {
builder.beginDocument();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("Below is an image:");
builder.endBlock();
builder.image(new ImageAttributes(), "/path/to/img.jpg");
builder.endDocument();
assertMarkup("Below is an image:\n\n![](/path/to/img.jpg)\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.ImageAttributes in project mylyn.docs by eclipse.
the class MarkdownDocumentBuilderTest method testImageNoUrl.
public void testImageNoUrl() {
builder.beginDocument();
ImageAttributes attr = new ImageAttributes();
attr.setAlt("Alt text");
attr.setTitle("Optional title");
builder.image(attr, null);
builder.endDocument();
assertMarkup("![Alt text]( \"Optional title\")\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.ImageAttributes in project mylyn.docs by eclipse.
the class ConfluenceDocumentBuilderTest method image.
@Test
public void image() {
builder.beginDocument();
builder.characters("a ");
builder.image(new ImageAttributes(), "fooImage.png");
builder.characters(" test");
builder.endDocument();
String markup = out.toString();
assertEquals("a !fooImage.png! test\n\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.ImageAttributes in project mylyn.docs by eclipse.
the class ConfluenceDocumentBuilderTest method imageWithTitle.
@Test
public void imageWithTitle() {
builder.beginDocument();
builder.characters("a ");
ImageAttributes attributes = new ImageAttributes();
attributes.setTitle("a value");
builder.image(attributes, "fooImage.png");
builder.characters(" test");
builder.endDocument();
String markup = out.toString();
assertEquals("a !fooImage.png|title=\"a value\"! test\n\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.ImageAttributes in project mylyn.docs by eclipse.
the class ConfluenceDocumentBuilderTest method imageLink.
@Test
public void imageLink() {
builder.beginDocument();
builder.characters("a ");
builder.imageLink(new LinkAttributes(), new ImageAttributes(), "#foo", "fooImage.png");
builder.characters(" test");
builder.endDocument();
String markup = out.toString();
assertEquals("a !fooImage.png!:#foo test\n\n", markup);
}
Aggregations