Search in sources :

Example 31 with ImageAttributes

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"));
}
Also used : ImageEvent(org.eclipse.mylyn.wikitext.parser.builder.event.ImageEvent) ImageAttributes(org.eclipse.mylyn.wikitext.parser.ImageAttributes) Test(org.junit.Test)

Example 32 with ImageAttributes

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"));
}
Also used : LinkAttributes(org.eclipse.mylyn.wikitext.parser.LinkAttributes) ImageAttributes(org.eclipse.mylyn.wikitext.parser.ImageAttributes) ImageLinkEvent(org.eclipse.mylyn.wikitext.parser.builder.event.ImageLinkEvent) Test(org.junit.Test)

Example 33 with ImageAttributes

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\""));
}
Also used : ImageAttributes(org.eclipse.mylyn.wikitext.parser.ImageAttributes)

Example 34 with ImageAttributes

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\""));
}
Also used : ImageAttributes(org.eclipse.mylyn.wikitext.parser.ImageAttributes)

Example 35 with ImageAttributes

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"));
}
Also used : LinkAttributes(org.eclipse.mylyn.wikitext.parser.LinkAttributes) ImageAttributes(org.eclipse.mylyn.wikitext.parser.ImageAttributes) ImageLinkEvent(org.eclipse.mylyn.wikitext.parser.builder.event.ImageLinkEvent) Test(org.junit.Test)

Aggregations

ImageAttributes (org.eclipse.mylyn.wikitext.parser.ImageAttributes)38 Test (org.junit.Test)17 LinkAttributes (org.eclipse.mylyn.wikitext.parser.LinkAttributes)10 Attributes (org.eclipse.mylyn.wikitext.parser.Attributes)3 ImageLinkEvent (org.eclipse.mylyn.wikitext.parser.builder.event.ImageLinkEvent)3 ImageEvent (org.eclipse.mylyn.wikitext.parser.builder.event.ImageEvent)2 Align (org.eclipse.mylyn.wikitext.parser.ImageAttributes.Align)1 TableAttributes (org.eclipse.mylyn.wikitext.parser.TableAttributes)1 TableCellAttributes (org.eclipse.mylyn.wikitext.parser.TableCellAttributes)1