@Test public void contingenciesProviderPreprocessor() { ContingenciesProvider provider = Mockito.mock(ContingenciesProvider.class); ContingenciesProviderFactory providerFactory = () -> provider; SecurityAnalysisPreprocessorFactory factory = new ContingenciesProviderPreprocessorFactory(providerFactory); assertEquals("default", factory.getName()); SecurityAnalysisPreprocessor preprocessor = factory.newPreprocessor(ByteSource.wrap("".getBytes())); SecurityAnalysisInput input = new SecurityAnalysisInput(Mockito.mock(Network.class), "variant"); preprocessor.preprocess(input); assertSame(provider, input.getContingenciesProvider()); }
public static SecurityAnalysisPreprocessorFactory wrap(ContingenciesProviderFactory factory) { return new ContingenciesProviderPreprocessorFactory(factory); }
SecurityAnalysisPreprocessors { public static SecurityAnalysisPreprocessorFactory wrap(ContingenciesProviderFactory factory) { return new ContingenciesProviderPreprocessorFactory(factory); } }
SecurityAnalysisPreprocessors { public static SecurityAnalysisPreprocessorFactory wrap(ContingenciesProviderFactory factory) { return new ContingenciesProviderPreprocessorFactory(factory); } private  SecurityAnalysisPreprocessors(); }
SecurityAnalysisPreprocessors { public static SecurityAnalysisPreprocessorFactory wrap(ContingenciesProviderFactory factory) { return new ContingenciesProviderPreprocessorFactory(factory); } private  SecurityAnalysisPreprocessors(); static SecurityAnalysisPreprocessorFactory factoryForName(String name); static Optional<SecurityAnalysisPreprocessorFactory> defaultConfiguredFactory(); static Optional<SecurityAnalysisPreprocessorFactory> configuredFactory(PlatformConfig platformConfig); static Optional<SecurityAnalysisPreprocessorFactory> configuredFactory(SecurityAnalysisConfig config); static SecurityAnalysisPreprocessorFactory wrap(ContingenciesProviderFactory factory); static SecurityAnalysisPreprocessor contingenciesPreprocessor(ContingenciesProviderFactory factory,
                                                                   ByteSource source); }
SecurityAnalysisPreprocessors { public static SecurityAnalysisPreprocessorFactory wrap(ContingenciesProviderFactory factory) { return new ContingenciesProviderPreprocessorFactory(factory); } private  SecurityAnalysisPreprocessors(); static SecurityAnalysisPreprocessorFactory factoryForName(String name); static Optional<SecurityAnalysisPreprocessorFactory> defaultConfiguredFactory(); static Optional<SecurityAnalysisPreprocessorFactory> configuredFactory(PlatformConfig platformConfig); static Optional<SecurityAnalysisPreprocessorFactory> configuredFactory(SecurityAnalysisConfig config); static SecurityAnalysisPreprocessorFactory wrap(ContingenciesProviderFactory factory); static SecurityAnalysisPreprocessor contingenciesPreprocessor(ContingenciesProviderFactory factory,
                                                                   ByteSource source);  }