use of org.eclipse.ceylon.tools.info.CeylonInfoTool in project ceylon by eclipse.
the class InfoToolTests method testModuleOnly.
@Test
public void testModuleOnly() throws Exception {
ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
Assert.assertNotNull(model);
CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Collections.<String>singletonList("ceylon.language"));
tool.run();
}
use of org.eclipse.ceylon.tools.info.CeylonInfoTool in project ceylon by eclipse.
the class InfoToolTests method testOptionalDependencies.
@Test
public void testOptionalDependencies() throws Exception {
ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
Assert.assertNotNull(model);
CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.asList("org.hibernate:hibernate-validator/5.3.0.Final"));
StringBuilder b = new StringBuilder();
tool.setOut(b);
tool.run();
Assert.assertTrue(b.toString().contains("joda-time"));
}
use of org.eclipse.ceylon.tools.info.CeylonInfoTool in project ceylon by eclipse.
the class InfoToolTests method testAetherModuleVersions.
@Test
public void testAetherModuleVersions() throws Exception {
ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
Assert.assertNotNull(model);
CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Collections.<String>singletonList("maven:asm:asm-commons"));
StringBuilder b = new StringBuilder();
tool.setOut(b);
tool.run();
Assert.assertTrue(b.toString().replace(System.lineSeparator(), "\n").contains("maven:asm:asm-commons/2.0\n" + "maven:asm:asm-commons/2.1\n" + "maven:asm:asm-commons/2.2\n" + "maven:asm:asm-commons/2.2.1\n" + "maven:asm:asm-commons/3.0\n" + "maven:asm:asm-commons/3.1\n" + "maven:asm:asm-commons/3.2\n" + "maven:asm:asm-commons/3.3\n" + "maven:asm:asm-commons/3.3.1"));
}
use of org.eclipse.ceylon.tools.info.CeylonInfoTool in project ceylon by eclipse.
the class InfoToolTests method testSuggestOverride.
@Test
public void testSuggestOverride() 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", "--print-overrides", "io.cayla.web/0.3.0"));
StringBuilder b = new StringBuilder();
tool.setOut(b);
tool.run();
Assert.assertTrue(b.toString().contains("<overrides>\n" + " <set module=\"org.jboss.logging\" version=\"3.1.3.GA\"/>\n" + "</overrides>\n"));
}
use of org.eclipse.ceylon.tools.info.CeylonInfoTool in project ceylon by eclipse.
the class InfoToolTests method testNoArgs.
@Test
public void testNoArgs() throws Exception {
ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
Assert.assertNotNull(model);
try {
CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Collections.<String>emptyList());
Assert.fail();
} catch (OptionArgumentException e) {
// asserting this is thrown
}
}
Aggregations