use of com.redhat.ceylon.tools.classpath.CeylonClasspathTool in project ceylon-compiler by ceylon.
the class ClasspathToolTests method testRecursiveDependenciesForce.
@Test
public void testRecursiveDependenciesForce() throws Exception {
ToolModel<CeylonClasspathTool> model = pluginLoader.loadToolModel("classpath");
Assert.assertNotNull(model);
CeylonClasspathTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.asList("--force", "io.cayla.web/0.3.0"));
StringBuilder b = new StringBuilder();
tool.setOut(b);
tool.run();
String cp = b.toString();
Assert.assertTrue(cp.contains("org.jboss.logging-3.1.3.GA.jar"));
Assert.assertFalse(cp.contains("org.jboss.logging-3.1.2.GA.jar"));
}
use of com.redhat.ceylon.tools.classpath.CeylonClasspathTool in project ceylon-compiler by ceylon.
the class ClasspathToolTests method testNoArgs.
@Test
public void testNoArgs() throws Exception {
ToolModel<CeylonClasspathTool> model = pluginLoader.loadToolModel("classpath");
Assert.assertNotNull(model);
try {
CeylonClasspathTool tool = pluginFactory.bindArguments(model, getMainTool(), Collections.<String>emptyList());
Assert.fail();
} catch (OptionArgumentException e) {
// asserting this is thrown
}
}
use of com.redhat.ceylon.tools.classpath.CeylonClasspathTool in project ceylon-compiler by ceylon.
the class ClasspathToolTests method testModuleNameWithBadVersion.
@Test
public void testModuleNameWithBadVersion() throws Exception {
ToolModel<CeylonClasspathTool> model = pluginLoader.loadToolModel("classpath");
Assert.assertNotNull(model);
CeylonClasspathTool tool = pluginFactory.bindArguments(model, getMainTool(), Collections.<String>singletonList("ceylon.language/666"));
try {
tool.run();
} catch (ToolUsageError x) {
Assert.assertTrue(x.getMessage().contains("Version 666 not found for module ceylon.language"));
}
}
Aggregations