Examples of LaunchConfigurationImpl


Examples of org.apache.ace.processlauncher.impl.LaunchConfigurationImpl

     *
     * @return a {@link LaunchConfigurationImpl} instance, never <code>null</code>.
     */
    private LaunchConfiguration createLaunchConfiguration(boolean respawnAutomatically, String execName,
        String... execArgs) throws Exception {
        return new LaunchConfigurationImpl(1, createTempDir().getAbsolutePath(), execName, execArgs, 0, null /* processStreamListenerFilter */,
            null /* processLifecycleListenerFilter */, respawnAutomatically);
    }
View Full Code Here

Examples of org.apache.ace.processlauncher.impl.LaunchConfigurationImpl

     * @param execArgs the (optional) arguments.
     * @return a {@link LaunchConfigurationImpl} instance, never <code>null</code>.
     */
    private LaunchConfiguration createLaunchConfiguration(boolean respawnAutomatically, String execName,
        String... execArgs) {
        return new LaunchConfigurationImpl(1, execName, execArgs, null, respawnAutomatically);
    }
View Full Code Here

Examples of org.apache.ace.processlauncher.impl.LaunchConfigurationImpl

    /**
     * Test that creating a valid {@link LaunchConfigurationImpl} works.
     */
    public void testCreateLaunchConfigurationOk() {
        LaunchConfiguration launchConfig = new LaunchConfigurationImpl(1, "/path/to/foo", new String[0], null, false);
        assertNotNull(launchConfig);
    }
View Full Code Here

Examples of org.apache.ace.processlauncher.impl.LaunchConfigurationImpl

     * Test that the {@link LaunchConfigurationImpl} constructor validates the executable name
     * properly.
     */
    public void testCreateLaunchConfigurationWithEmptyExecutableNameFail() {
        try {
            new LaunchConfigurationImpl(1, "", new String[0], null, false);
            fail("Exception expected!");
        }
        catch (IllegalArgumentException expected) {
            // Ok...
        }
View Full Code Here

Examples of org.apache.ace.processlauncher.impl.LaunchConfigurationImpl

     * Test that the {@link LaunchConfigurationImpl} constructor validates the instance count
     * properly.
     */
    public void testCreateLaunchConfigurationWithNegativeInstanceCountFail() {
        try {
            new LaunchConfigurationImpl(-1, "/path/to/foo", new String[0], null, false);
            fail("Exception expected!");
        }
        catch (IllegalArgumentException expected) {
            // Ok...
        }
View Full Code Here

Examples of org.apache.ace.processlauncher.impl.LaunchConfigurationImpl

     * Test that the {@link LaunchConfigurationImpl} constructor validates the executable arguments
     * properly.
     */
    public void testCreateLaunchConfigurationWithNullExecutableArgsFail() {
        try {
            new LaunchConfigurationImpl(1, "/path/to/foo", null, null, false);
            fail("Exception expected!");
        }
        catch (IllegalArgumentException expected) {
            // Ok...
        }
View Full Code Here

Examples of org.apache.ace.processlauncher.impl.LaunchConfigurationImpl

     * Test that the {@link LaunchConfigurationImpl} constructor validates the executable name
     * properly.
     */
    public void testCreateLaunchConfigurationWithNullExecutableNameFail() {
        try {
            new LaunchConfigurationImpl(1, null, new String[0], null, false);
            fail("Exception expected!");
        }
        catch (IllegalArgumentException expected) {
            // Ok...
        }
View Full Code Here

Examples of org.apache.ace.processlauncher.impl.LaunchConfigurationImpl

     * Test that the {@link LaunchConfigurationImpl} constructor validates the instance count
     * properly.
     */
    public void testCreateLaunchConfigurationWithZeroInstanceCountFail() {
        try {
            new LaunchConfigurationImpl(0, "/path/to/foo", new String[0], null, false);
            fail("Exception expected!");
        }
        catch (IllegalArgumentException expected) {
            // Ok...
        }
View Full Code Here

Examples of org.apache.ace.processlauncher.impl.LaunchConfigurationImpl

     * Test that the {@link LaunchConfigurationImpl#getCommandLine()} method works properly when one
     * executable arguments are given.
     */
    public void testGetCommandLineWithOneArgumentsOk() {
        LaunchConfiguration launchConfig =
            new LaunchConfigurationImpl(1, "/path/to/foo", new String[] { "-bar" }, null, false);

        String[] commandLine = launchConfig.getCommandLine();
        assertNotNull(commandLine);
        assertEquals(2, commandLine.length);

        assertEquals("/path/to/foo", commandLine[0]);
        assertEquals("-bar", commandLine[1]);
View Full Code Here

Examples of org.apache.ace.processlauncher.impl.LaunchConfigurationImpl

     * Test that the {@link LaunchConfigurationImpl#getCommandLine()} method works properly when no
     * executable arguments are given.
     */
    public void testGetCommandLineWithoutArgumentsOk() {
        LaunchConfiguration launchConfig =
            new LaunchConfigurationImpl(1, "cwd", "/path/to/foo", new String[0], 0, "(foo=bar)", "(qux=quu)", false);

        String[] commandLine = launchConfig.getCommandLine();
        assertNotNull(commandLine);
        assertEquals(1, commandLine.length);

        assertEquals("/path/to/foo", commandLine[0]);
        assertEquals("cwd", launchConfig.getWorkingDirectory().getName());
        assertNotNull(launchConfig.getProcessStreamListener());
        assertFalse(launchConfig.isRespawnAutomatically());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.