Search in sources :

Example 6 with MarkupToEclipseToc

use of org.eclipse.mylyn.wikitext.parser.util.MarkupToEclipseToc in project mylyn.docs by eclipse.

the class MarkupToEclipseHelpMojoTest method createMarkupToEclipseTocAnchorLevel.

@Test
public void createMarkupToEclipseTocAnchorLevel() {
    File file = mock(File.class);
    doReturn("Test.html").when(file).getName();
    MarkupToEclipseToc toc = markupToEclipseHelp.createMarkupToEclipseToc("", file, "Test");
    assertEquals(0, toc.getAnchorLevel());
    markupToEclipseHelp.tocAnchorLevel = 3;
    toc = markupToEclipseHelp.createMarkupToEclipseToc("", file, "Test");
    assertEquals(3, toc.getAnchorLevel());
}
Also used : MarkupToEclipseToc(org.eclipse.mylyn.wikitext.parser.util.MarkupToEclipseToc) File(java.io.File) Test(org.junit.Test)

Example 7 with MarkupToEclipseToc

use of org.eclipse.mylyn.wikitext.parser.util.MarkupToEclipseToc in project mylyn.docs by eclipse.

the class MarkupToEclipseHelpMojoTest method createMarkupToEclipseTocCopyrightNotice.

@Test
public void createMarkupToEclipseTocCopyrightNotice() {
    File file = mock(File.class);
    doReturn("Test.html").when(file).getName();
    markupToEclipseHelp.copyrightNotice = "Test Copyright";
    MarkupToEclipseToc toc = markupToEclipseHelp.createMarkupToEclipseToc("", file, "Test");
    assertEquals("Test Copyright", toc.getCopyrightNotice());
}
Also used : MarkupToEclipseToc(org.eclipse.mylyn.wikitext.parser.util.MarkupToEclipseToc) File(java.io.File) Test(org.junit.Test)

Aggregations

MarkupToEclipseToc (org.eclipse.mylyn.wikitext.parser.util.MarkupToEclipseToc)7 File (java.io.File)4 SplittingMarkupToEclipseToc (org.eclipse.mylyn.wikitext.splitter.SplittingMarkupToEclipseToc)3 OutputStreamWriter (java.io.OutputStreamWriter)2 Writer (java.io.Writer)2 Test (org.junit.Test)2 BufferedOutputStream (java.io.BufferedOutputStream)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 FileOutputStream (java.io.FileOutputStream)1 IOException (java.io.IOException)1 PrintWriter (java.io.PrintWriter)1 StringWriter (java.io.StringWriter)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 BuildException (org.apache.tools.ant.BuildException)1 IFile (org.eclipse.core.resources.IFile)1 IPath (org.eclipse.core.runtime.IPath)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 Path (org.eclipse.core.runtime.Path)1 IRunnableWithProgress (org.eclipse.jface.operation.IRunnableWithProgress)1 TextileLanguage (org.eclipse.mylyn.wikitext.textile.TextileLanguage)1