Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: lisrte <[email protected]>
  • Loading branch information
Lisrte committed Apr 23, 2024
1 parent 3998857 commit 2a1ab4b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private static Stream<Arguments> 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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 2a1ab4b

Please sign in to comment.