@Test(expected = CommandLineException.class) public void shouldThrowExceptionBecauseExistStatus2() throws CommandLineException { OSCommand com = new OSCommand("cat arquivo_que_nao_existe"); com.execute(); }
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();  }