Search in sources :

Example 1 with CeylonInfoTool

use of org.eclipse.ceylon.tools.info.CeylonInfoTool in project ceylon by eclipse.

the class InfoToolTests method testRecursiveDependencies.

@Test
public void testRecursiveDependencies() throws Exception {
    ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
    Assert.assertNotNull(model);
    CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.asList("--dependency-depth=-1", "--show-incompatible=yes", "io.cayla.web/0.3.0"));
    StringBuilder b = new StringBuilder();
    tool.setOut(b);
    tool.run();
    Assert.assertTrue(b.toString().replace(System.lineSeparator(), "\n").contains("Dependencies version conflicts (up to depth ∞):\n" + "  org.jboss.logging: 3.1.2.GA, 3.1.3.GA\n"));
}
Also used : CeylonInfoTool(org.eclipse.ceylon.tools.info.CeylonInfoTool) Test(org.junit.Test)

Example 2 with CeylonInfoTool

use of org.eclipse.ceylon.tools.info.CeylonInfoTool in project ceylon by eclipse.

the class InfoToolTests method testAetherModule.

@Test
public void testAetherModule() throws Exception {
    ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
    Assert.assertNotNull(model);
    CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.asList("--dependency-depth=-1", "com.sparkjava:spark-core/2.1"));
    StringBuilder b = new StringBuilder();
    tool.setOut(b);
    tool.run();
    Assert.assertTrue(b.toString().replace(System.lineSeparator(), "\n").contains("Dependencies (up to depth ∞):\n" + "  org.eclipse.jetty.orbit:javax.servlet/3.0.0.v201112011016\n" + "  org.eclipse.jetty:jetty-http/9.0.2.v20130417\n" + "  org.eclipse.jetty:jetty-io/9.0.2.v20130417\n" + "  org.eclipse.jetty:jetty-security/9.0.2.v20130417\n" + "  org.eclipse.jetty:jetty-server/9.0.2.v20130417\n" + "  org.eclipse.jetty:jetty-servlet/9.0.2.v20130417\n" + "  org.eclipse.jetty:jetty-util/9.0.2.v20130417\n" + "  org.eclipse.jetty:jetty-webapp/9.0.2.v20130417\n" + "  org.eclipse.jetty:jetty-xml/9.0.2.v20130417\n" + "  org.slf4j:slf4j-api/1.7.7\n" + "  org.slf4j:slf4j-simple/1.7.7\n"));
}
Also used : CeylonInfoTool(org.eclipse.ceylon.tools.info.CeylonInfoTool) Test(org.junit.Test)

Example 3 with CeylonInfoTool

use of org.eclipse.ceylon.tools.info.CeylonInfoTool in project ceylon by eclipse.

the class InfoToolTests method testJdkModule.

@Test
public void testJdkModule() throws Exception {
    ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
    Assert.assertNotNull(model);
    CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Collections.<String>singletonList("java.base/" + JDKUtils.jdk.version));
    StringBuilder b = new StringBuilder();
    tool.setOut(b);
    tool.run();
    Assert.assertTrue(b.toString().replace(System.lineSeparator(), "\n").contains("Name:        java.base\n" + "Version:     " + JDKUtils.jdk.version + "\n" + "Artifacts:   JVM (legacy)\n" + "Available:   On local system\n" + "Origin:      Java Runtime\n" + "Description: JDK module java.base\n"));
}
Also used : CeylonInfoTool(org.eclipse.ceylon.tools.info.CeylonInfoTool) Test(org.junit.Test)

Example 4 with CeylonInfoTool

use of org.eclipse.ceylon.tools.info.CeylonInfoTool in project ceylon by eclipse.

the class InfoToolTests method testModuleVersion.

@Test
public void testModuleVersion() throws Exception {
    ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
    Assert.assertNotNull(model);
    CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Collections.<String>singletonList("ceylon.language/" + Versions.CEYLON_VERSION_NUMBER));
}
Also used : CeylonInfoTool(org.eclipse.ceylon.tools.info.CeylonInfoTool) Test(org.junit.Test)

Example 5 with CeylonInfoTool

use of org.eclipse.ceylon.tools.info.CeylonInfoTool in project ceylon by eclipse.

the class InfoToolTests method testOffline.

@Test
public void testOffline() throws Exception {
    ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
    Assert.assertNotNull(model);
    CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.<String>asList("--offline", "ceylon.language"));
}
Also used : CeylonInfoTool(org.eclipse.ceylon.tools.info.CeylonInfoTool) Test(org.junit.Test)

Aggregations

CeylonInfoTool (org.eclipse.ceylon.tools.info.CeylonInfoTool)13 Test (org.junit.Test)13 OptionArgumentException (org.eclipse.ceylon.common.tool.OptionArgumentException)1