Search in sources :

Example 11 with CeylonRunTool

use of ceylon.modules.bootstrap.CeylonRunTool in project ceylon by eclipse.

the class RunToolTestCase method testModuleNoVersionArgs.

@Test
public void testModuleNoVersionArgs() throws Exception {
    ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
    Assert.assertNotNull(model);
    CeylonRunTool tool = pluginFactory.bindArguments(model, getMainTool(), options("hello", "Tako"));
    assertOutput(tool, OUT_EXPECTED_WITH_ARG);
}
Also used : CeylonRunTool(ceylon.modules.bootstrap.CeylonRunTool) Test(org.junit.Test) AbstractToolTest(org.eclipse.ceylon.common.tool.AbstractToolTest)

Example 12 with CeylonRunTool

use of ceylon.modules.bootstrap.CeylonRunTool in project ceylon by eclipse.

the class RunToolTestCase method testQuotedModuleNameNoVersion.

@Test
public void testQuotedModuleNameNoVersion() throws Exception {
    ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
    Assert.assertNotNull(model);
    CeylonRunTool tool = pluginFactory.bindArguments(model, getMainTool(), options("foo.long.module"));
    assertOutput(tool, OUT_EXPECTED_DEFAULT);
}
Also used : CeylonRunTool(ceylon.modules.bootstrap.CeylonRunTool) Test(org.junit.Test) AbstractToolTest(org.eclipse.ceylon.common.tool.AbstractToolTest)

Example 13 with CeylonRunTool

use of ceylon.modules.bootstrap.CeylonRunTool in project ceylon by eclipse.

the class RunToolTestCase method testNoArgs.

@Test
public void testNoArgs() throws Exception {
    ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
    Assert.assertNotNull(model);
    try {
        CeylonRunTool tool = pluginFactory.bindArguments(model, getMainTool(), Collections.<String>emptyList());
        Assert.fail();
    } catch (OptionArgumentException e) {
    // asserting this is thrown
    }
}
Also used : CeylonRunTool(ceylon.modules.bootstrap.CeylonRunTool) OptionArgumentException(org.eclipse.ceylon.common.tool.OptionArgumentException) Test(org.junit.Test) AbstractToolTest(org.eclipse.ceylon.common.tool.AbstractToolTest)

Example 14 with CeylonRunTool

use of ceylon.modules.bootstrap.CeylonRunTool in project ceylon by eclipse.

the class RunToolTestCase method testModuleVersion.

@Test
public void testModuleVersion() throws Exception {
    ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
    Assert.assertNotNull(model);
    CeylonRunTool tool = pluginFactory.bindArguments(model, getMainTool(), options("hello/1.0.0"));
    assertOutput(tool, OUT_EXPECTED_DEFAULT);
}
Also used : CeylonRunTool(ceylon.modules.bootstrap.CeylonRunTool) Test(org.junit.Test) AbstractToolTest(org.eclipse.ceylon.common.tool.AbstractToolTest)

Aggregations

CeylonRunTool (ceylon.modules.bootstrap.CeylonRunTool)14 AbstractToolTest (org.eclipse.ceylon.common.tool.AbstractToolTest)14 Test (org.junit.Test)14 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 PrintStream (java.io.PrintStream)1 OptionArgumentException (org.eclipse.ceylon.common.tool.OptionArgumentException)1