Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public void apply(Network network, NamingStrategy namingStrategy, ReportNode sub
.withReferenceBusbarSectionId(busbarSection.getId())
.withCreateTheBusbarSectionsAfterTheReferenceBusbarSection(modificationInfos.isAfterBusbarSectionId())
.withAllBusbars(modificationInfos.isAllBusbars())
.withLeftSwitchOpen(modificationInfos.isSwitchOpen())
.withRightSwitchOpen(modificationInfos.isSwitchOpen())
.withLeftSwitchKind(modificationInfos.getLeftSwitchKind() != null ? SwitchKind.valueOf(modificationInfos.getLeftSwitchKind()) : SwitchKind.DISCONNECTOR)
.withRightSwitchKind(modificationInfos.getRightSwitchKind() != null ? SwitchKind.valueOf(modificationInfos.getRightSwitchKind()) : SwitchKind.DISCONNECTOR)
.withSwitchPrefixId(voltageLevel.getId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected ModificationInfos buildModification() {
.leftSwitchKind("BREAKER")
.rightSwitchKind("DISCONNECTOR")
.isAllBusbars(false)
.isSwitchOpen(false)
.isSwitchOpen(true)
.build();
}

Expand Down Expand Up @@ -88,6 +88,13 @@ protected void assertAfterNetworkModificationApplication() {
.map(Switch::getId)
.collect(Collectors.toSet());
assertFalse(switchIds.isEmpty());
assertTrue(switchIds.containsAll(List.of("v1_DISCONNECTOR_0_7", "v1_BREAKER_7_8", "v1_DISCONNECTOR_8_6")));
Switch disconnector1 = getNetwork().getSwitch("v1_DISCONNECTOR_0_7");
Switch disconnector2 = getNetwork().getSwitch("v1_DISCONNECTOR_8_6");
Switch breaker1 = getNetwork().getSwitch("v1_BREAKER_7_8");
assertTrue(disconnector1.isOpen());
assertTrue(disconnector2.isOpen());
assertTrue(breaker1.isOpen());
}

@Override
Expand Down
Loading