Package com.redhat.ceylon.tools.src

Examples of com.redhat.ceylon.tools.src.CeylonSrcTool


    @Test
    public void testNoArgs() throws Exception {
        ToolModel<CeylonSrcTool> model = pluginLoader.loadToolModel("src");
        Assert.assertNotNull(model);
        try {
            CeylonSrcTool tool = pluginFactory.bindArguments(model, Collections.<String>emptyList());
            Assert.fail();
        } catch (OptionArgumentException e) {
            // asserting this is thrown
        }
    }
View Full Code Here


   
    @Test
    public void testModuleVersion() throws Exception {
        ToolModel<CeylonSrcTool> model = pluginLoader.loadToolModel("src");
        Assert.assertNotNull(model);
        CeylonSrcTool tool = pluginFactory.bindArguments(model, Collections.<String>singletonList("ceylon.language/"+Versions.CEYLON_VERSION_NUMBER));
    }
View Full Code Here

   
    @Test
    public void testModuleOnly() throws Exception {
        ToolModel<CeylonSrcTool> model = pluginLoader.loadToolModel("src");
        Assert.assertNotNull(model);
        CeylonSrcTool tool = pluginFactory.bindArguments(model, Collections.<String>singletonList("ceylon.language"));
    }
View Full Code Here

   
    @Test
    public void testOffline() throws Exception {
        ToolModel<CeylonSrcTool> model = pluginLoader.loadToolModel("src");
        Assert.assertNotNull(model);
        CeylonSrcTool tool = pluginFactory.bindArguments(model, Arrays.<String>asList("--offline", "ceylon.language"));
    }
View Full Code Here

    public void testUnpacking() throws Exception {
        compile("src_tool_test/module.ceylon", "src_tool_test/package.ceylon", "src_tool_test/foo.ceylon");
       
        ToolModel<CeylonSrcTool> model = pluginLoader.loadToolModel("src");
        Assert.assertNotNull(model);
        CeylonSrcTool tool = pluginFactory.bindArguments(model, Arrays.<String>asList(
                "--cacherep", getCachePath(),
                "--rep", getOutPath(),
                "--src", "build/test-source",
                "com.redhat.ceylon.tools.test.test_mod_source.src_tool_test/1.0.0"));
        tool.run();
       
        String path = "build/test-source/com/redhat/ceylon/tools/test/test_mod_source/src_tool_test";
        File dir = new File(path);
        Assert.assertTrue(dir.isDirectory());
        File moduleFile = new File(dir, "module.ceylon");
View Full Code Here

    public void testUnpackingCwd() throws Exception {
        compile("src_tool_test/module.ceylon", "src_tool_test/package.ceylon", "src_tool_test/foo.ceylon");
       
        ToolModel<CeylonSrcTool> model = pluginLoader.loadToolModel("src");
        Assert.assertNotNull(model);
        CeylonSrcTool tool = pluginFactory.bindArguments(model, Arrays.<String>asList(
                "--cacherep", removeRoot(getCachePath()),
                "--rep", removeRoot(getOutPath()),
                "--cwd", "build",
                "--src", "test-source2",
                "com.redhat.ceylon.tools.test.test_mod_source.src_tool_test/1.0.0"));
        tool.run();
       
        String path = "build/test-source2/com/redhat/ceylon/tools/test/test_mod_source/src_tool_test";
        File dir = new File(path);
        Assert.assertTrue(dir.isDirectory());
        File moduleFile = new File(dir, "module.ceylon");
View Full Code Here

TOP

Related Classes of com.redhat.ceylon.tools.src.CeylonSrcTool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.