diff --git a/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/DynamicModelsSupplierTest.java b/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/DynamicModelsSupplierTest.java index de01d2460..8e91c52da 100644 --- a/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/DynamicModelsSupplierTest.java +++ b/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/DynamicModelsSupplierTest.java @@ -142,7 +142,7 @@ private static Stream provideAutomationSystemModelData() { Arguments.of("/dynamicModels/overloadManagementTwoLevels.groovy", DynamicTwoLevelsOverloadManagementSystem.class, EurostagTutorialExample1Factory.create(), "AM_NHV1_NHV2_1", "CLA", "CurrentLimitAutomatonTwoLevels"), Arguments.of("/dynamicModels/tapChanger.groovy", TapChangerAutomationSystem.class, EurostagTutorialExample1Factory.create(), "TC", "tc", "TapChangerAutomaton"), Arguments.of("/dynamicModels/tapChangerBlockingBusBar.groovy", TapChangerBlockingAutomationSystem.class, FourSubstationsNodeBreakerFactory.create(), "ZAB", "ZAB", "TapChangerBlockingAutomaton2"), - Arguments.of("/dynamicModels/tapChangerBlocking.groovy", TapChangerBlockingAutomationSystem.class, EurostagTutorialExample1Factory.create(), "ZAB", "ZAB", "TapChangerBlockingAutomaton3"), + Arguments.of("/dynamicModels/tapChangerBlocking.groovy", TapChangerBlockingAutomationSystem.class, EurostagTutorialExample1Factory.createWithLFResults(), "ZAB", "ZAB", "TapChangerBlockingAutomaton3"), Arguments.of("/dynamicModels/phaseShifterI.groovy", PhaseShifterIAutomationSystem.class, EurostagTutorialExample1Factory.create(), "PS_NGEN_NHV1", "ps", "PhaseShifterI"), Arguments.of("/dynamicModels/phaseShifterP.groovy", PhaseShifterPAutomationSystem.class, EurostagTutorialExample1Factory.create(), "PS_NGEN_NHV1", "ps", "PhaseShifterP"), Arguments.of("/dynamicModels/underVoltage.groovy", UnderVoltageAutomationSystem.class, EurostagTutorialExample1Factory.create(), "UV_GEN", "uv", "UnderVoltageAutomaton") diff --git a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/EmptyTapChangerBlockingAutomationSystemXmlTest.java b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/EmptyTapChangerBlockingAutomationSystemXmlTest.java index e10b80a9b..6b1073c6f 100644 --- a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/EmptyTapChangerBlockingAutomationSystemXmlTest.java +++ b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/EmptyTapChangerBlockingAutomationSystemXmlTest.java @@ -10,8 +10,6 @@ import com.powsybl.dynawaltz.models.automationsystems.TapChangerAutomationSystemBuilder; import com.powsybl.dynawaltz.models.automationsystems.TapChangerBlockingAutomationSystemBuilder; import com.powsybl.dynawaltz.models.loads.LoadOneTransformerBuilder; -import com.powsybl.iidm.network.Bus; -import com.powsybl.iidm.network.VoltageLevel; import com.powsybl.iidm.network.test.EurostagTutorialExample1Factory; import org.junit.jupiter.api.Test; import org.xml.sax.SAXException; @@ -26,10 +24,14 @@ class EmptyTapChangerBlockingAutomationSystemXmlTest extends AbstractDynamicMode @Override protected void setupNetwork() { - network = EurostagTutorialExample1Factory.create(); - VoltageLevel vlload = network.getVoltageLevel("VLLOAD"); - Bus nload = network.getBusBreakerView().getBus("NLOAD"); - vlload.newLoad().setId("LOAD2").setBus(nload.getId()).setConnectableBus(nload.getId()).setP0(600.0).setQ0(200.0).add(); + network = EurostagTutorialExample1Factory.createWithLFResults(); + network.getVoltageLevel("VLLOAD").newLoad() + .setId("LOAD2") + .setBus("NLOAD") + .setConnectableBus("NLOAD") + .setP0(600.0) + .setQ0(200.0) + .add(); } @Override diff --git a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/TapChangerAutomationSystemXmlTest.java b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/TapChangerAutomationSystemXmlTest.java index 47fe9ca54..16456732a 100644 --- a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/TapChangerAutomationSystemXmlTest.java +++ b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/TapChangerAutomationSystemXmlTest.java @@ -26,7 +26,7 @@ class TapChangerAutomationSystemXmlTest extends AbstractDynamicModelXmlTest { @Override protected void setupNetwork() { - network = EurostagTutorialExample1Factory.create(); + network = EurostagTutorialExample1Factory.createWithLFResults(); VoltageLevel vlload = network.getVoltageLevel("VLLOAD"); Bus nload = network.getBusBreakerView().getBus("NLOAD"); vlload.newLoad().setId("LOAD2").setBus(nload.getId()).setConnectableBus(nload.getId()).setP0(600.0).setQ0(200.0).add(); diff --git a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/TapChangerBlockingAutomationSystemXmlTest.java b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/TapChangerBlockingAutomationSystemXmlTest.java index a793eb8d0..9b313b9c9 100644 --- a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/TapChangerBlockingAutomationSystemXmlTest.java +++ b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/TapChangerBlockingAutomationSystemXmlTest.java @@ -12,8 +12,6 @@ import com.powsybl.dynawaltz.models.loads.LoadTwoTransformersTapChangersBuilder; import com.powsybl.dynawaltz.models.transformers.TransformerFixedRatioBuilder; import com.powsybl.dynawaltz.models.automationsystems.TapChangerBlockingAutomationSystemBuilder; -import com.powsybl.iidm.network.Bus; -import com.powsybl.iidm.network.VoltageLevel; import com.powsybl.iidm.network.test.EurostagTutorialExample1Factory; import org.junit.jupiter.api.Test; import org.xml.sax.SAXException; @@ -31,10 +29,14 @@ class TapChangerBlockingAutomationSystemXmlTest extends AbstractDynamicModelXmlT @Override protected void setupNetwork() { - network = EurostagTutorialExample1Factory.create(); - VoltageLevel vlload = network.getVoltageLevel("VLLOAD"); - Bus nload = network.getBusBreakerView().getBus("NLOAD"); - vlload.newLoad().setId("LOAD2").setBus(nload.getId()).setConnectableBus(nload.getId()).setP0(600.0).setQ0(200.0).add(); + network = EurostagTutorialExample1Factory.createWithLFResults(); + network.getVoltageLevel("VLLOAD").newLoad() + .setId("LOAD2") + .setBus("NLOAD") + .setConnectableBus("NLOAD") + .setP0(600.0) + .setQ0(200.0) + .add(); } @Override