@Test public void test() throws IOException { writeToDslFile("contingency('c1') {", " equipments 'NHV1_NHV2_1'", "}"); List<Contingency> contingencies = new GroovyDslContingenciesProvider(dslFile) .getContingencies(network); assertEquals(1, contingencies.size()); Contingency contingency = contingencies.get(0); assertEquals("c1", contingency.getId()); assertEquals(0, contingency.getExtensions().size()); assertEquals(1, contingency.getElements().size()); ContingencyElement element = contingency.getElements().iterator().next(); assertTrue(element instanceof BranchContingency); assertEquals("NHV1_NHV2_1", element.getId()); }
@Override public List<Contingency> getContingencies(Network network) { return new ContingencyDslLoader(script).load(network); }
GroovyDslContingenciesProvider extends AbstractDslContingenciesProvider { @Override public List<Contingency> getContingencies(Network network) { return new ContingencyDslLoader(script).load(network); } }
GroovyDslContingenciesProvider extends AbstractDslContingenciesProvider { @Override public List<Contingency> getContingencies(Network network) { return new ContingencyDslLoader(script).load(network); } GroovyDslContingenciesProvider(final Path path);  GroovyDslContingenciesProvider(final InputStream input); }
GroovyDslContingenciesProvider extends AbstractDslContingenciesProvider { @Override public List<Contingency> getContingencies(Network network) { return new ContingencyDslLoader(script).load(network); } GroovyDslContingenciesProvider(final Path path);  GroovyDslContingenciesProvider(final InputStream input); @Override List<Contingency> getContingencies(Network network); }
GroovyDslContingenciesProvider extends AbstractDslContingenciesProvider { @Override public List<Contingency> getContingencies(Network network) { return new ContingencyDslLoader(script).load(network); } GroovyDslContingenciesProvider(final Path path);  GroovyDslContingenciesProvider(final InputStream input); @Override List<Contingency> getContingencies(Network network);  }