use of org.eclipse.mylyn.wikitext.parser.ImageAttributes in project mylyn.docs by eclipse.
the class EventDocumentBuilderTest method image.
@Test
public void image() {
builder.image(new ImageAttributes(), "http://example.com/foo.png");
assertEvents(new ImageEvent(new ImageAttributes(), "http://example.com/foo.png"));
}
use of org.eclipse.mylyn.wikitext.parser.ImageAttributes in project mylyn.docs by eclipse.
the class EventDocumentBuilderTest method imageLink.
@Test
public void imageLink() {
builder.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 XslfoDocumentBuilderTest method testImageWithHeightInPx.
public void testImageWithHeightInPx() {
ImageAttributes attributes = new ImageAttributes();
attributes.setHeight(10);
builder.image(attributes, "some/image.png");
String generatedContent = out.toString();
assertTrue(generatedContent.contains("height=\"10px\""));
}
use of org.eclipse.mylyn.wikitext.parser.ImageAttributes in project mylyn.docs by eclipse.
the class XslfoDocumentBuilderTest method testImageWithWidthInPx.
public void testImageWithWidthInPx() {
ImageAttributes attributes = new ImageAttributes();
attributes.setWidth(10);
builder.image(attributes, "some/image.png");
String generatedContent = out.toString();
assertTrue(generatedContent.contains("width=\"10px\""));
}
use of org.eclipse.mylyn.wikitext.parser.ImageAttributes in project mylyn.docs by eclipse.
the class ImageLinkEventTest method equals.
@Test
public void equals() {
assertEquality(new ImageLinkEvent(new LinkAttributes(), new ImageAttributes(), "http://example.com", "http://example.com/img.png"), new ImageLinkEvent(new LinkAttributes(), new ImageAttributes(), "http://example.com", "http://example.com/img.png"));
assertInequality(new ImageLinkEvent(new LinkAttributes(), new ImageAttributes(), "http://example.com", "http://example.com/img.png"), new ImageLinkEvent(new LinkAttributes(), new ImageAttributes(), "http://example.com", "http://example.com/img2.png"));
assertInequality(new ImageLinkEvent(new LinkAttributes(), new ImageAttributes(), "http://example.com", "http://example.com/img.png"), new ImageLinkEvent(new LinkAttributes(), new ImageAttributes(), "http://example.com/2", "http://example.com/img.png"));
}
Aggregations