Package net.sourceforge.clownfish.mojo

Examples of net.sourceforge.clownfish.mojo.AbstractBaseMojo


    /**
     * Test create command.
     */
    public void testCreateCommand() {
       
        AbstractBaseMojo testMojo = createTestMojo();
       
        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

TOP

Related Classes of net.sourceforge.clownfish.mojo.AbstractBaseMojo

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.