@Test public void checkLocal() { SecurityAnalysisExecution execution = builder.build(); assertTrue(execution instanceof SecurityAnalysisExecutionImpl); execution.execute(Mockito.mock(ComputationManager.class), new SecurityAnalysisExecutionInput()); assertNotNull(actualProvider.get()); assertEquals(10, actualProvider.get().getContingencies(null).size()); }
public SecurityAnalysisExecution build() { if (forward) { return new ForwardedSecurityAnalysisExecution(externalConfig.get(), taskCount); } else if (taskCount != null) { return new DistributedSecurityAnalysisExecution(externalConfig.get(), taskCount); } else { return new SecurityAnalysisExecutionImpl(factory.get(), inputBuildStrategy()); } }
SecurityAnalysisExecutionBuilder { public SecurityAnalysisExecution build() { if (forward) { return new ForwardedSecurityAnalysisExecution(externalConfig.get(), taskCount); } else if (taskCount != null) { return new DistributedSecurityAnalysisExecution(externalConfig.get(), taskCount); } else { return new SecurityAnalysisExecutionImpl(factory.get(), inputBuildStrategy()); } } }
SecurityAnalysisExecutionBuilder { public SecurityAnalysisExecution build() { if (forward) { return new ForwardedSecurityAnalysisExecution(externalConfig.get(), taskCount); } else if (taskCount != null) { return new DistributedSecurityAnalysisExecution(externalConfig.get(), taskCount); } else { return new SecurityAnalysisExecutionImpl(factory.get(), inputBuildStrategy()); } } SecurityAnalysisExecutionBuilder(Supplier<ExternalSecurityAnalysisConfig> externalConfig,
                                            Supplier<SecurityAnalysisFactory> factory,
                                            SecurityAnalysisInputBuildStrategy inputBuildStrategy); }
SecurityAnalysisExecutionBuilder { public SecurityAnalysisExecution build() { if (forward) { return new ForwardedSecurityAnalysisExecution(externalConfig.get(), taskCount); } else if (taskCount != null) { return new DistributedSecurityAnalysisExecution(externalConfig.get(), taskCount); } else { return new SecurityAnalysisExecutionImpl(factory.get(), inputBuildStrategy()); } } SecurityAnalysisExecutionBuilder(Supplier<ExternalSecurityAnalysisConfig> externalConfig,
                                            Supplier<SecurityAnalysisFactory> factory,
                                            SecurityAnalysisInputBuildStrategy inputBuildStrategy); SecurityAnalysisExecutionBuilder forward(boolean forward); SecurityAnalysisExecutionBuilder distributed(Integer taskCount); SecurityAnalysisExecutionBuilder subTask(Partition part); SecurityAnalysisExecution build(); }
SecurityAnalysisExecutionBuilder { public SecurityAnalysisExecution build() { if (forward) { return new ForwardedSecurityAnalysisExecution(externalConfig.get(), taskCount); } else if (taskCount != null) { return new DistributedSecurityAnalysisExecution(externalConfig.get(), taskCount); } else { return new SecurityAnalysisExecutionImpl(factory.get(), inputBuildStrategy()); } } SecurityAnalysisExecutionBuilder(Supplier<ExternalSecurityAnalysisConfig> externalConfig,
                                            Supplier<SecurityAnalysisFactory> factory,
                                            SecurityAnalysisInputBuildStrategy inputBuildStrategy); SecurityAnalysisExecutionBuilder forward(boolean forward); SecurityAnalysisExecutionBuilder distributed(Integer taskCount); SecurityAnalysisExecutionBuilder subTask(Partition part); SecurityAnalysisExecution build();  }