@Test public void testRunLocalCommand() throws CommandLineException { OSCommand com = new OSCommand("echo 42"); String result = com.execute(); assertEquals("42", result.replace("\n", "")); }
public String execute() throws CommandLineException { executeCommand(); CommandResultRetriever retriever = new CommandResultRetriever(); retriever.call(); return result; }
OSCommand { public String execute() throws CommandLineException { executeCommand(); CommandResultRetriever retriever = new CommandResultRetriever(); retriever.call(); return result; } }
OSCommand { public String execute() throws CommandLineException { executeCommand(); CommandResultRetriever retriever = new CommandResultRetriever(); retriever.call(); return result; } OSCommand(String command);  OSCommand(String command, boolean verbose);  OSCommand(String command, String workingDirectory);  OSCommand(String command, String workingDirectory, boolean verbose); }
OSCommand { public String execute() throws CommandLineException { executeCommand(); CommandResultRetriever retriever = new CommandResultRetriever(); retriever.call(); return result; } OSCommand(String command);  OSCommand(String command, boolean verbose);  OSCommand(String command, String workingDirectory);  OSCommand(String command, String workingDirectory, boolean verbose); String getCommand(); String getResult(); int getExitStatus(); boolean isVerbose(); String getWorkingDirectory(); void setWorkingDirectory(String workingDirectory); String execute(); void executeAssync(); void killProcess(); @Override String toString(); }
OSCommand { public String execute() throws CommandLineException { executeCommand(); CommandResultRetriever retriever = new CommandResultRetriever(); retriever.call(); return result; } OSCommand(String command);  OSCommand(String command, boolean verbose);  OSCommand(String command, String workingDirectory);  OSCommand(String command, String workingDirectory, boolean verbose); String getCommand(); String getResult(); int getExitStatus(); boolean isVerbose(); String getWorkingDirectory(); void setWorkingDirectory(String workingDirectory); String execute(); void executeAssync(); void killProcess(); @Override String toString();  }