Search in sources :

Example 6 with Stylesheet

use of org.eclipse.mylyn.wikitext.parser.builder.HtmlDocumentBuilder.Stylesheet in project mylyn.docs by eclipse.

the class MarkupToEclipseHelpMojoTest method configureStylesheetUrlsWithRelativePath.

@Test
public void configureStylesheetUrlsWithRelativePath() {
    markupToEclipseHelp.stylesheetUrls = Arrays.asList("bar.css");
    HtmlDocumentBuilder builder = mock(HtmlDocumentBuilder.class);
    markupToEclipseHelp.configureStylesheets(builder, "one/two");
    ArgumentCaptor<Stylesheet> captor = ArgumentCaptor.forClass(Stylesheet.class);
    verify(builder).addCssStylesheet(captor.capture());
    assertEquals("../../bar.css", captor.getValue().getUrl());
}
Also used : HtmlDocumentBuilder(org.eclipse.mylyn.wikitext.parser.builder.HtmlDocumentBuilder) SplittingHtmlDocumentBuilder(org.eclipse.mylyn.wikitext.splitter.SplittingHtmlDocumentBuilder) Stylesheet(org.eclipse.mylyn.wikitext.parser.builder.HtmlDocumentBuilder.Stylesheet) Test(org.junit.Test)

Aggregations

Stylesheet (org.eclipse.mylyn.wikitext.parser.builder.HtmlDocumentBuilder.Stylesheet)6 File (java.io.File)2 Attributes (org.eclipse.mylyn.wikitext.parser.Attributes)2 LinkAttributes (org.eclipse.mylyn.wikitext.parser.LinkAttributes)2 HtmlDocumentBuilder (org.eclipse.mylyn.wikitext.parser.builder.HtmlDocumentBuilder)2 FileReader (java.io.FileReader)1 FileWriter (java.io.FileWriter)1 Writer (java.io.Writer)1 URL (java.net.URL)1 Item (org.eclipse.mylyn.docs.epub.opf.Item)1 MarkupParser (org.eclipse.mylyn.wikitext.parser.MarkupParser)1 SplittingHtmlDocumentBuilder (org.eclipse.mylyn.wikitext.splitter.SplittingHtmlDocumentBuilder)1 XmlStreamWriter (org.eclipse.mylyn.wikitext.util.XmlStreamWriter)1 Test (org.junit.Test)1