@Test public void forwardedBeforeWithLog() throws IOException { SecurityAnalysisExecutionInput input = new SecurityAnalysisExecutionInput() .setParameters(new SecurityAnalysisParameters()) .setNetworkVariant(EurostagTutorialExample1Factory.create(), VariantManagerConstants.INITIAL_VARIANT_ID) .setContingenciesSource(ByteSource.wrap("contingencies definition".getBytes(StandardCharsets.UTF_8))); ExecutionHandler<SecurityAnalysisResultWithLog> handler = SecurityAnalysisExecutionHandlers.forwardedWithLogs(input); List<CommandExecution> commandExecutions = handler.before(workingDir); SimpleCommand command = (SimpleCommand) commandExecutions.get(0).getCommand(); List<String> args = command.getArgs(0); assertThat(command.getArgs(0).subList(1, args.size())) .containsExactlyInAnyOrder("--case-file=/work/network.xiidm", "--parameters-file=/work/parameters.json", "--output-file=/work/result.json", "--output-format=JSON", "--contingencies-file=/work/contingencies.groovy", "--log-file=/work/logs.zip"); }
public static ExecutionHandler<SecurityAnalysisResultWithLog> forwardedWithLogs(SecurityAnalysisExecutionInput input) { return forwardedWithLogs(input, null); }
SecurityAnalysisExecutionHandlers { public static ExecutionHandler<SecurityAnalysisResultWithLog> forwardedWithLogs(SecurityAnalysisExecutionInput input) { return forwardedWithLogs(input, null); } }
SecurityAnalysisExecutionHandlers { public static ExecutionHandler<SecurityAnalysisResultWithLog> forwardedWithLogs(SecurityAnalysisExecutionInput input) { return forwardedWithLogs(input, null); } private  SecurityAnalysisExecutionHandlers(); }
SecurityAnalysisExecutionHandlers { public static ExecutionHandler<SecurityAnalysisResultWithLog> forwardedWithLogs(SecurityAnalysisExecutionInput input) { return forwardedWithLogs(input, null); } private  SecurityAnalysisExecutionHandlers(); static ExecutionHandler<SecurityAnalysisResult> forwarded(SecurityAnalysisExecutionInput input); static ExecutionHandler<SecurityAnalysisResult> forwarded(SecurityAnalysisExecutionInput input, Integer forwardedTaskCount); static ExecutionHandler<SecurityAnalysisResultWithLog> forwardedWithLogs(SecurityAnalysisExecutionInput input); static ExecutionHandler<SecurityAnalysisResultWithLog> forwardedWithLogs(SecurityAnalysisExecutionInput input, Integer forwardedTaskCount); static ExecutionHandler<SecurityAnalysisResult> distributed(SecurityAnalysisExecutionInput input, int subtaskCount); static ExecutionHandler<SecurityAnalysisResultWithLog> distributedWithLog(SecurityAnalysisExecutionInput input, int subtaskCount); static SecurityAnalysisResult readSingleResult(Path workingDir); static SecurityAnalysisResultWithLog readSingleResultWithLogs(Path workingDir); static void forwardedOptions(Path workingDir, SecurityAnalysisCommandOptions options, Integer taskCount); static void forwardedWithLogsOptions(Path workingDir, SecurityAnalysisCommandOptions options, Integer taskCount); static void distributedOptions(Path workingDir, SecurityAnalysisCommandOptions options, int taskCount); static void distributedWithLogsOptions(Path workingDir, SecurityAnalysisCommandOptions options, int taskCount); static Path getOutputPathForTask(Path workingDir, int taskIndex); static SecurityAnalysisResult readResults(Path workingDir, int subtaskCount); static SecurityAnalysisResultWithLog readResultsWithLogs(Path workingDir, int subtaskCount); static Path getLogPathForTask(Path workingDir, int taskNumber); static Path getLogPath(Path workingDir); }
SecurityAnalysisExecutionHandlers { public static ExecutionHandler<SecurityAnalysisResultWithLog> forwardedWithLogs(SecurityAnalysisExecutionInput input) { return forwardedWithLogs(input, null); } private  SecurityAnalysisExecutionHandlers(); static ExecutionHandler<SecurityAnalysisResult> forwarded(SecurityAnalysisExecutionInput input); static ExecutionHandler<SecurityAnalysisResult> forwarded(SecurityAnalysisExecutionInput input, Integer forwardedTaskCount); static ExecutionHandler<SecurityAnalysisResultWithLog> forwardedWithLogs(SecurityAnalysisExecutionInput input); static ExecutionHandler<SecurityAnalysisResultWithLog> forwardedWithLogs(SecurityAnalysisExecutionInput input, Integer forwardedTaskCount); static ExecutionHandler<SecurityAnalysisResult> distributed(SecurityAnalysisExecutionInput input, int subtaskCount); static ExecutionHandler<SecurityAnalysisResultWithLog> distributedWithLog(SecurityAnalysisExecutionInput input, int subtaskCount); static SecurityAnalysisResult readSingleResult(Path workingDir); static SecurityAnalysisResultWithLog readSingleResultWithLogs(Path workingDir); static void forwardedOptions(Path workingDir, SecurityAnalysisCommandOptions options, Integer taskCount); static void forwardedWithLogsOptions(Path workingDir, SecurityAnalysisCommandOptions options, Integer taskCount); static void distributedOptions(Path workingDir, SecurityAnalysisCommandOptions options, int taskCount); static void distributedWithLogsOptions(Path workingDir, SecurityAnalysisCommandOptions options, int taskCount); static Path getOutputPathForTask(Path workingDir, int taskIndex); static SecurityAnalysisResult readResults(Path workingDir, int subtaskCount); static SecurityAnalysisResultWithLog readResultsWithLogs(Path workingDir, int subtaskCount); static Path getLogPathForTask(Path workingDir, int taskNumber); static Path getLogPath(Path workingDir);  }