Package net.sourceforge.clownfish.core.conf

Examples of net.sourceforge.clownfish.core.conf.Command


     */
    public void testLoadDeploymentManager() {
       
        try {
            clownfishHelper.loadDeploymentManager(
                    null, new Command(null));
            fail("deploymentFactoryManager is null - "
                    + "should throw IllegalArgumentException");
        } catch (IllegalArgumentException e) {
            // do-nothing
        }
View Full Code Here


                new MyTargetModuleID("artifact", null, null),
                new MyTargetModuleID("other", null, null)
               
            };
           
            Command command = new Command(null);
            command.setArtifact("artifact.war");

            DeploymentManager deploymentManager = EasyMock.createMock(
                    DeploymentManager.class);
           
            EasyMock.expect(deploymentManager.getNonRunningModules(moduleType,
View Full Code Here

                new MyTargetModuleID("artifact", null, null),
                new MyTargetModuleID("other", null, null)
               
            };
           
            Command command = new Command(null);
            command.setArtifact("artifact.war");

            DeploymentManager deploymentManager = EasyMock.createMock(
                    DeploymentManager.class);
           
            EasyMock.expect(deploymentManager.getRunningModules(moduleType,
View Full Code Here

                new MyTargetModuleID("other", null, null),
                new MyTargetModuleID("artifact", null, null),
                new MyTargetModuleID("etc", null, null)
            };
           
            Command command = new Command(null);
            command.setArtifact("artifact.war");

            DeploymentManager deploymentManager = EasyMock.createMock(
                    DeploymentManager.class);
           
            EasyMock.expect(deploymentManager.getRunningModules(moduleType,
View Full Code Here

        ClownfishHelperImpl clownfishHelper = new ClownfishHelperImpl();
        CommandFactoryImpl commandFactory = new CommandFactoryImpl();
       
        commandFactory.setClownfishHelper(clownfishHelper);
       
        Command command = commandFactory.createCommand(testMojo);
       
        assertNotNull(command);
        assertEquals("artifact", command.getArtifact());
        assertEquals("deploymentFactoryManagerClassName",
                command.getDeploymentFactoryManagerClassName());
        assertEquals("deploymentManagerUri", command.getDeploymentManagerURI());
        assertEquals("password", command.getPassword());
        assertEquals("username", command.getUsername());
        assertTrue(command.isVerbose());
       
        assertEquals(3, command.getTargetList().size());
        assertEquals("server1", command.getTargetList().get(0));
        assertEquals("server2", command.getTargetList().get(1));
        assertEquals("server3", command.getTargetList().get(2));
        assertEquals("ear", command.getModuleType());
       
       
        // test null module type
        testMojo.setModuleType(null);
        command = commandFactory.createCommand(testMojo);
        assertNull(command.getModuleType());
       
       
        // test empty module type
        testMojo.setModuleType("");
        command = commandFactory.createCommand(testMojo);
        assertNull(command.getModuleType());
    }
View Full Code Here

        // test null
        mojoProgressListenerFactory.setLog(null);
        assertNull(mojoProgressListenerFactory.getLog());
       
       
        Command command = new Command();
        TaskProgress taskProgress = EasyMock.createMock(TaskProgress.class);
        EasyMock.replay(taskProgress);
       
        try {
            mojoProgressListenerFactory.createCommonProgressListeners(
View Full Code Here

       
        MojoProgressListenerFactoryImpl mojoProgressListenerFactory
                = new MojoProgressListenerFactoryImpl();
        mojoProgressListenerFactory.setLog(log);
       
        Command command = new Command();
       
        TaskProgress taskProgress = EasyMock.createMock(TaskProgress.class);
       
        EasyMock.replay(taskProgress);
       
View Full Code Here

       
        MojoProgressListenerFactoryImpl mojoProgressListenerFactory
                = new MojoProgressListenerFactoryImpl();
        mojoProgressListenerFactory.setLog(log);
       
        Command command = new Command();
       
        ModuleStartable moduleStartable
                = EasyMock.createMock(ModuleStartable.class);
        TaskProgress taskProgress = EasyMock.createMock(TaskProgress.class);
       
        boolean autostart = command.isAutostart();
        boolean verbose = command.isVerbose();
       
        EasyMock.replay(moduleStartable);
        EasyMock.replay(taskProgress);
       
        List<ProgressListener> progressListeners = mojoProgressListenerFactory
View Full Code Here

       
        artifactTypeList = new ArrayList<String>();
        artifactTypeList.add("ear");
        artifactTypeList.add("war");

        command = new Command();
        command.setTargetList(targetList);
        command.setArtifactTypeList(artifactTypeList);
        command.setArtifact(ARTIFACT_FILENAME);
       
       
View Full Code Here

    public void execute() throws MojoExecutionException {
       
        try {
            super.execute();
           
            Command command = getCommand();
            postExecute();

            if (command.isVerbose() && getLog().isInfoEnabled()) {
                logMessage(STOP_MSG, command.getTargetList());
            }
           
            Clownfish clownfish = getClownfish();

            if (!clownfish.stop()) {
View Full Code Here

TOP

Related Classes of net.sourceforge.clownfish.core.conf.Command

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.