@Test public void testRun() throws Exception { String[] args = new String[] { TestProcess.class.getCanonicalName() }; ProcessWrapper.main(args); assertTrue(TestProcess.isExecuted()); }
public void run(String[] args) throws Exception{ CommandLine cmdLine = CmdLineParser.parse(args); CmdLineParserForProcessConstruction constructionParser = new CmdLineParserForProcessConstruction(); Process process = constructionParser.run(cmdLine); Ports ports = new Ports(process.getInputPorts(), process.getOutputPorts()); CmdLineParserForProcessRunParameters runParametersParser = new CmdLineParserForProcessRunParameters(); ProcessParameters params = runParametersParser.run(cmdLine, ports); Configuration conf = getConfiguration(); process.run(params.getPortBindings(), conf, params.getParameters()); createOutputsIfDontExist( process.getOutputPorts(), params.getPortBindings().getOutput(), conf); }
ProcessWrapper { public void run(String[] args) throws Exception{ CommandLine cmdLine = CmdLineParser.parse(args); CmdLineParserForProcessConstruction constructionParser = new CmdLineParserForProcessConstruction(); Process process = constructionParser.run(cmdLine); Ports ports = new Ports(process.getInputPorts(), process.getOutputPorts()); CmdLineParserForProcessRunParameters runParametersParser = new CmdLineParserForProcessRunParameters(); ProcessParameters params = runParametersParser.run(cmdLine, ports); Configuration conf = getConfiguration(); process.run(params.getPortBindings(), conf, params.getParameters()); createOutputsIfDontExist( process.getOutputPorts(), params.getPortBindings().getOutput(), conf); } }
ProcessWrapper { public void run(String[] args) throws Exception{ CommandLine cmdLine = CmdLineParser.parse(args); CmdLineParserForProcessConstruction constructionParser = new CmdLineParserForProcessConstruction(); Process process = constructionParser.run(cmdLine); Ports ports = new Ports(process.getInputPorts(), process.getOutputPorts()); CmdLineParserForProcessRunParameters runParametersParser = new CmdLineParserForProcessRunParameters(); ProcessParameters params = runParametersParser.run(cmdLine, ports); Configuration conf = getConfiguration(); process.run(params.getPortBindings(), conf, params.getParameters()); createOutputsIfDontExist( process.getOutputPorts(), params.getPortBindings().getOutput(), conf); }  }
ProcessWrapper { public void run(String[] args) throws Exception{ CommandLine cmdLine = CmdLineParser.parse(args); CmdLineParserForProcessConstruction constructionParser = new CmdLineParserForProcessConstruction(); Process process = constructionParser.run(cmdLine); Ports ports = new Ports(process.getInputPorts(), process.getOutputPorts()); CmdLineParserForProcessRunParameters runParametersParser = new CmdLineParserForProcessRunParameters(); ProcessParameters params = runParametersParser.run(cmdLine, ports); Configuration conf = getConfiguration(); process.run(params.getPortBindings(), conf, params.getParameters()); createOutputsIfDontExist( process.getOutputPorts(), params.getPortBindings().getOutput(), conf); }  Configuration getConfiguration(); static void main(String[] args); void run(String[] args); }
ProcessWrapper { public void run(String[] args) throws Exception{ CommandLine cmdLine = CmdLineParser.parse(args); CmdLineParserForProcessConstruction constructionParser = new CmdLineParserForProcessConstruction(); Process process = constructionParser.run(cmdLine); Ports ports = new Ports(process.getInputPorts(), process.getOutputPorts()); CmdLineParserForProcessRunParameters runParametersParser = new CmdLineParserForProcessRunParameters(); ProcessParameters params = runParametersParser.run(cmdLine, ports); Configuration conf = getConfiguration(); process.run(params.getPortBindings(), conf, params.getParameters()); createOutputsIfDontExist( process.getOutputPorts(), params.getPortBindings().getOutput(), conf); }  Configuration getConfiguration(); static void main(String[] args); void run(String[] args);  }