use of com.redhat.ceylon.common.tool.ToolUsageError in project ceylon-compiler by ceylon.
the class CompilerToolTests method testDefaultModuleNoFiles.
@Test
public void testDefaultModuleNoFiles() throws Exception {
ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
Assert.assertNotNull(model);
try {
CeylonCompileTool tool = pluginFactory.bindArguments(model, getMainTool(), options("--src=test/src/com/redhat/ceylon/tools/test/empty", "default"));
tool.run();
Assert.fail("Tool should have thrown an exception");
} catch (ToolUsageError e) {
Assert.assertEquals("Module default does not contain any sources or resources", e.getMessage());
}
}
use of com.redhat.ceylon.common.tool.ToolUsageError in project ceylon-compiler by ceylon.
the class ImportJarToolTests method testBug1630.
@Test
public void testBug1630() throws Exception {
FileUtil.delete(destFile("importtest"));
ToolModel<CeylonImportJarTool> model = pluginLoader.loadToolModel("import-jar");
Assert.assertNotNull(model);
try {
CeylonImportJarTool tool = pluginFactory.bindArguments(model, getMainTool(), options("--dry-run", "--descriptor", "test/src/com/redhat/ceylon/tools/test/test-descriptor.properties", "importtest/1.0", "test/src/com/redhat/ceylon/tools/test/test2.jar"));
tool.run();
Assert.fail();
} catch (ToolUsageError e) {
Assert.assertEquals("Problems were found, aborting.", e.getMessage());
}
}
Aggregations