use of org.eclipse.mylyn.wikitext.parser.ImageAttributes in project mylyn.docs by eclipse.
the class XslfoDocumentBuilderTest method testImageWithHeightInPct.
public void testImageWithHeightInPct() {
ImageAttributes attributes = new ImageAttributes();
attributes.setHeight(10);
attributes.setHeightPercentage(true);
builder.image(attributes, "some/image.png");
String generatedContent = out.toString();
assertTrue(generatedContent.contains("height=\"10%\""));
}
use of org.eclipse.mylyn.wikitext.parser.ImageAttributes in project mylyn.docs by eclipse.
the class MultiplexingDocumentBuilderTest method imageLink.
@Test
public void imageLink() {
multiplexer.imageLink(new LinkAttributes(), new ImageAttributes(), "https://example.com", "http://example.com/foo.png");
assertEvents(new ImageLinkEvent(new LinkAttributes(), new ImageAttributes(), "https://example.com", "http://example.com/foo.png"));
}
use of org.eclipse.mylyn.wikitext.parser.ImageAttributes in project mylyn.docs by eclipse.
the class ConfluenceDocumentBuilderTest method imageWithAlt.
@Test
public void imageWithAlt() {
builder.beginDocument();
builder.characters("a ");
ImageAttributes attributes = new ImageAttributes();
attributes.setAlt("a value");
builder.image(attributes, "fooImage.png");
builder.characters(" test");
builder.endDocument();
String markup = out.toString();
assertEquals("a !fooImage.png|alt=\"a value\"! test\n\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.ImageAttributes in project mylyn.docs by eclipse.
the class ConfluenceDocumentBuilderTest method imageNoUrl.
@Test
public void imageNoUrl() {
builder.beginDocument();
builder.characters("a ");
builder.image(new ImageAttributes(), null);
builder.characters(" test");
builder.endDocument();
String markup = out.toString();
assertEquals("a test\n\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.ImageAttributes in project mylyn.docs by eclipse.
the class ConfluenceDocumentBuilderTest method imageWithAltAndTitle.
@Test
public void imageWithAltAndTitle() {
builder.beginDocument();
builder.characters("a ");
ImageAttributes attributes = new ImageAttributes();
attributes.setAlt("first value");
attributes.setTitle("second value");
builder.image(attributes, "fooImage.png");
builder.characters(" test");
builder.endDocument();
String markup = out.toString();
assertEquals("a !fooImage.png|alt=\"first value\",title=\"second value\"! test\n\n", markup);
}
Aggregations