Examples of ProcessTester


Examples of org.codehaus.xharness.testutil.ProcessTester

    }
   
    public void testGetCommandline() throws Exception {
        Project project = new Project();
       
        ProcessTester server = new ProcessTester();
       
        XhJavaTask task = new XhJavaTask();
        task.setProject(project);
        task.setClassname(ProcessTester.class.getName());
        Path path = new Path(project, getClassPath());
        task.setClasspath(path);
        task.createArg().setLine("-p " + server.getPort());
        task.createArg().setLine("-s user.dir");
       
        task.execute();
        assertContains("Wrong commandline", JVM.toLowerCase(), task.getCommandline().toLowerCase());
        assertContains("Wrong commandline", " -classpath ", task.getCommandline());
        assertContains("Wrong commandline", ProcessTester.class.getName(), task.getCommandline());
        assertContains("Wrong commandline", " -p " + server.getPort(), task.getCommandline());
        assertContains("Wrong commandline", " -s user.dir", task.getCommandline());
    }
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.