Search in sources :

Example 16 with CeylonImportJarTool

use of com.redhat.ceylon.tools.importjar.CeylonImportJarTool in project ceylon-compiler by ceylon.

the class ImportJarToolTests method testDryRun.

@Test
public void testDryRun() throws Exception {
    FileUtil.delete(destFile("importtest"));
    ToolModel<CeylonImportJarTool> model = pluginLoader.loadToolModel("import-jar");
    Assert.assertNotNull(model);
    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/test.jar"));
    tool.run();
    File f1 = destFile("importtest/1.0/importtest-1.0.jar");
    File f2 = destFile("importtest/1.0/importtest-1.0.jar.sha1");
    File f3 = destFile("importtest/1.0/module.properties");
    Assert.assertTrue(!f1.exists() && !f2.exists());
    Assert.assertTrue(!f3.exists());
}
Also used : CeylonImportJarTool(com.redhat.ceylon.tools.importjar.CeylonImportJarTool) File(java.io.File) Test(org.junit.Test)

Aggregations

CeylonImportJarTool (com.redhat.ceylon.tools.importjar.CeylonImportJarTool)16 Test (org.junit.Test)16 File (java.io.File)6 ImportJarException (com.redhat.ceylon.tools.importjar.ImportJarException)5 OptionArgumentException (com.redhat.ceylon.common.tool.OptionArgumentException)3 ToolUsageError (com.redhat.ceylon.common.tool.ToolUsageError)2