From 6ea6dfc0498b81ea2a862db6da714d42d6bb350c Mon Sep 17 00:00:00 2001 From: Geoffroy Jamgotchian Date: Wed, 4 Dec 2024 12:30:41 +0100 Subject: [PATCH] Add unit test Signed-off-by: Geoffroy Jamgotchian --- .../iidm/network/tck/AbstractConvertTopologyTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/iidm/iidm-tck/src/test/java/com/powsybl/iidm/network/tck/AbstractConvertTopologyTest.java b/iidm/iidm-tck/src/test/java/com/powsybl/iidm/network/tck/AbstractConvertTopologyTest.java index 0da28a523c6..6e922e7ddeb 100644 --- a/iidm/iidm-tck/src/test/java/com/powsybl/iidm/network/tck/AbstractConvertTopologyTest.java +++ b/iidm/iidm-tck/src/test/java/com/powsybl/iidm/network/tck/AbstractConvertTopologyTest.java @@ -7,9 +7,11 @@ */ package com.powsybl.iidm.network.tck; +import com.powsybl.commons.PowsyblException; import com.powsybl.iidm.network.*; import com.powsybl.iidm.network.events.RemovalNetworkEvent; import com.powsybl.iidm.network.events.UpdateNetworkEvent; +import com.powsybl.iidm.network.test.EurostagTutorialExample1Factory; import com.powsybl.iidm.network.test.FourSubstationsNodeBreakerFactory; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -39,6 +41,14 @@ void setUp() { network.addListener(eventRecorder); } + @Test + void testBusBreakerToNodeBreaker() { + Network busBreakerNetwork = EurostagTutorialExample1Factory.create(); + VoltageLevel vlgen = busBreakerNetwork.getVoltageLevel("VLGEN"); + var e = assertThrows(PowsyblException.class, () -> vlgen.convertToTopology(TopologyKind.NODE_BREAKER)); + assertEquals("Topology model conversion from bus/breaker to node/breaker not yet supported", e.getMessage()); + } + @Test void testNodeBreakerToBusBreaker() { var gh1 = network.getGenerator("GH1");