Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
  • Loading branch information
geofjamg committed Dec 4, 2024
1 parent 9f486bd commit 6ea6dfc
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 6ea6dfc

Please sign in to comment.