use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.
the class DocToolTests method testDocNonShared.
@Test
public void testDocNonShared() throws Exception {
ToolModel<CeylonDocTool> model = pluginLoader.loadToolModel("doc");
Assert.assertNotNull(model);
CeylonDocTool tool = pluginFactory.bindArguments(model, getMainTool(), toolOptions("--non-shared", "--src=test/src", "org.eclipse.ceylon.tools.test.ceylon"));
tool.run();
}
use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.
the class CeylonDocToolTests method moduleA.
private void moduleA(boolean includeNonShared) throws Exception {
String pathname = "test/ceylondoc";
String docname = "test/ceylondoc-doc";
String moduleName = "org.eclipse.ceylon.ceylondoc.test.modules.single";
CeylonDocTool tool = tool(pathname, docname, moduleName, true, false);
tool.setIncludeNonShared(includeNonShared);
tool.setIncludeSourceCode(true);
tool.setHeader("<div class='navbar-inverse navbar-static-top'>" + "<div class='navbar-inner' style='color:white; font-style: italic; text-align: center'>" + "documentation under construction" + "</div>" + "</div>");
tool.setFooter("<p style='text-align: right;'>" + "Copyright © 2010-2013, Red Hat, Inc. or third-party contributors" + "</p>");
tool.run();
File destDir = getOutputDir(tool, moduleName, "3.1.4");
assertFileExists(destDir, includeNonShared);
assertResourcesExists(destDir, ".resources");
assertBasicContent(destDir, includeNonShared);
assertConstructors(destDir, includeNonShared);
assertBy(destDir);
assertLicense(destDir);
assertParametersDocumentation(destDir);
assertParametersAssertions(destDir);
assertParametersLinks(destDir);
assertThrows(destDir);
assertSee(destDir);
assertSince(destDir);
assertIcons(destDir);
assertInnerTypesDoc(destDir);
assertDeprecated(destDir);
assertTagged(destDir);
assertDocumentationOfRefinedMember(destDir);
assertSequencedParameter(destDir);
assertCallableParameter(destDir);
assertTupleParameter(destDir);
assertDefaultedParametres(destDir);
assertAnythingReturnType(destDir);
assertFencedCodeBlockWithSyntaxHighlighter(destDir);
assertWikiStyleLinkSyntax(destDir, includeNonShared);
assertConstants(destDir);
assertLinksToRefinedDeclaration(destDir);
assertGenericTypeParams(destDir);
assertObjectPageDifferences(destDir);
assertSharedParameterOfClass(destDir);
assertAliases(destDir);
assertPackageNavigation(destDir);
assertSubpackages(destDir);
assertAnnotations(destDir);
assertAbstractClassModifier(destDir);
assertFinalClassModifier(destDir);
assertHeaderAndFooter(destDir);
assertExceptions(destDir);
assertNameAliases(destDir);
assertBug659ShowInheritedMembers(destDir);
assertBug691AbbreviatedOptionalType(destDir);
assertBug839(destDir);
assertBug927LoadingAndSortingInheritedMembers(destDir);
assertBug968(destDir);
assertBug1619BrokenLinkFromInheritedDoc(destDir);
assertBug1619BrokenLinkWithNewLine(destDir);
assertBug2307AliasedName(destDir);
}
use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.
the class CeylonDocToolTests method documentDefaultModule.
@Test
public void documentDefaultModule() throws Exception {
String pathname = "test/ceylondoc";
String moduleName = "default";
CeylonDocTool tool = tool(pathname, moduleName, true, "build/ceylon-cars");
tool.setIncludeNonShared(true);
tool.run();
File destDirA = getOutputDir(tool, "org.eclipse.ceylon.ceylondoc.test.modules.multi.a", "1");
File destDirB = getOutputDir(tool, "org.eclipse.ceylon.ceylondoc.test.modules.multi.b", "1");
File destDirDef = getOutputDir(tool, makeDefaultModule());
assertFileNotExists(destDirA, "index.html");
assertFileNotExists(destDirB, "index.html");
assertFileExists(destDirDef, "index.html");
assertFileExists(destDirDef, "org/eclipse/ceylon/ceylondoc/test/modules/multi/goes/into/bar.object.html");
assertFileExists(destDirDef, "org/eclipse/ceylon/ceylondoc/test/modules/multi/goes/into/defaultmodule/foo.object.html");
}
use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.
the class CeylonDocToolTests method documentSingleModule.
@Test
public void documentSingleModule() throws Exception {
String pathname = "test/ceylondoc";
String moduleName = "org.eclipse.ceylon.ceylondoc.test.modules.multi.a";
CeylonDocTool tool = tool(pathname, moduleName, true, "build/ceylon-cars");
tool.run();
File destDirA = getOutputDir(tool, "org.eclipse.ceylon.ceylondoc.test.modules.multi.a", "1");
File destDirB = getOutputDir(tool, "org.eclipse.ceylon.ceylondoc.test.modules.multi.b", "1");
File destDirDef = getOutputDir(tool, makeDefaultModule());
assertFileExists(destDirA, "index.html");
assertFileNotExists(destDirB, "index.html");
assertFileNotExists(destDirDef, "index.html");
}
use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.
the class CeylonDocToolTests method bug2346.
@Test
public void bug2346() throws Exception {
String pathname = "test/ceylondoc";
String moduleName = "org.eclipse.ceylon.ceylondoc.test.modules.bug2346";
Module module = new Module();
module.setName(Arrays.asList(moduleName));
module.setVersion("1");
CeylonDocTool tool = tool(Arrays.asList(new File(pathname)), Arrays.asList(new File("doc")), Arrays.asList(moduleName), true, false, false);
tool.run();
}
Aggregations