Skip to content

Commit

Permalink
release 0.8.0 network modification version (#603)
Browse files Browse the repository at this point in the history
Signed-off-by: Ghazwa Rehili <ghazwarhili@gmail.com>
  • Loading branch information
ghazwarhili authored Feb 18, 2025
1 parent 483fadb commit 518d498
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<mockwebserver3.version>5.0.0-alpha.14</mockwebserver3.version>
<liquibase-hibernate-package>org.gridsuite.modification.server</liquibase-hibernate-package>
<sonar.coverage.exclusions>**/migration/**/*</sonar.coverage.exclusions>
<network-modification.version>0.7.0</network-modification.version>
<network-modification.version>0.8.0</network-modification.version>
</properties>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ void testEquipmentIdNonNull() {
String errorMessage = "equipmentId is marked non-null but is null";
LoadCreationInfosBuilder<?, ?> loadCreationBuilder = LoadCreationInfos.builder();
assertEquals(errorMessage, assertThrows(NullPointerException.class, loadCreationBuilder::build).getMessage());
LoadCreationInfosBuilder<?, ?> loadCreationBuilder1 = loadCreationBuilder.equipmentId(null);
assertEquals(errorMessage, assertThrows(NullPointerException.class, loadCreationBuilder1::build).getMessage());
assertEquals(errorMessage, assertThrows(NullPointerException.class, () -> loadCreationBuilder.equipmentId(null)).getMessage());
LoadCreationInfos loadCreationInfos = LoadCreationInfos.builder().equipmentId("idLoad").build();
assertEquals(errorMessage, assertThrows(NullPointerException.class, () -> loadCreationInfos.setEquipmentId(null)).getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ void testCreateWithErrors() throws Exception {
.content(modificationInfosJson)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk());
assertLogMessage(new NetworkModificationException(TWO_WINDINGS_TRANSFORMER_NOT_FOUND, "Two windings transformer with ID '2wt_not_existing' does not exist in the network").getMessage(),
assertLogMessage(new NetworkModificationException(TWO_WINDINGS_TRANSFORMER_NOT_FOUND, "Two windings transformer with ID '2wt_not_existing' : it does not exist in the network").getMessage(),
twoWindingsTransformerModificationInfos.getErrorType().name(), reportService);
}

Expand Down Expand Up @@ -589,7 +589,7 @@ private TwoWindingsTransformer createPhaseTapChanger(PhaseTapChanger.RegulationM
Terminal phaseTapChangerTerminal = ModificationUtils.getInstance().getTerminalFromIdentifiable(getNetwork(),
"v3load",
"LOAD",
"V3");
"v3");
twt3.newPhaseTapChanger()
.setLowTapPosition(0)
.setTapPosition(1)
Expand Down Expand Up @@ -938,7 +938,7 @@ private void preparePhaseTapChangerAdder(PhaseTapChangerAdder phaseTapChangerAdd
Terminal phaseTapChangerTerminal = ModificationUtils.getInstance().getTerminalFromIdentifiable(getNetwork(),
"v3load",
"LOAD",
"V3");
"v3");
phaseTapChangerAdder.setLowTapPosition(0)
.setTapPosition(1)
.setRegulationTerminal(phaseTapChangerTerminal)
Expand Down Expand Up @@ -982,7 +982,7 @@ void testPhaseTapChangerRegulationCreation() throws Exception {
.tapPosition(new AttributeModification<>(1, OperationType.SET))
.regulatingTerminalId(new AttributeModification<>("v3load", OperationType.SET))
.regulatingTerminalType(new AttributeModification<>("LOAD", OperationType.SET))
.regulatingTerminalVlId(new AttributeModification<>("V3", OperationType.SET))
.regulatingTerminalVlId(new AttributeModification<>("v3", OperationType.SET))
.steps(List.of(TapChangerStepCreationInfos.builder()
.index(0)
.r(0)
Expand Down Expand Up @@ -1029,7 +1029,7 @@ void testPhaseTapChangerRegulationCreation() throws Exception {
.tapPosition(new AttributeModification<>(1, OperationType.SET))
.regulatingTerminalId(new AttributeModification<>("v3load", OperationType.SET))
.regulatingTerminalType(new AttributeModification<>("LOAD", OperationType.SET))
.regulatingTerminalVlId(new AttributeModification<>("V3", OperationType.SET))
.regulatingTerminalVlId(new AttributeModification<>("v3", OperationType.SET))
.steps(List.of(TapChangerStepCreationInfos.builder()
.index(0)
.r(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected TwoWindingsTransformerModificationInfos buildOneModification(String eq
protected void assertAfterNetworkModificationCreation() {
assertEquals(0.0, getNetwork().getTwoWindingsTransformer("trf1").getR(), 0.001);
assertEquals(1.0, getNetwork().getTwoWindingsTransformer("trf2").getR(), 0.001);
assertLogMessage("TWO_WINDINGS_TRANSFORMER_NOT_FOUND : Two windings transformer with ID 'unknownTwt' does not exist in the network", ModificationType.TWO_WINDINGS_TRANSFORMER_MODIFICATION.name() + "1", reportService);
assertLogMessage("TWO_WINDINGS_TRANSFORMER_NOT_FOUND : Two windings transformer with ID 'unknownTwt' : it does not exist in the network", ModificationType.TWO_WINDINGS_TRANSFORMER_MODIFICATION.name() + "1", reportService);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public static Network create(UUID uuid, boolean createHvdcLine, NetworkFactory n
Terminal phaseTapChangerTerminal = ModificationUtils.getInstance().getTerminalFromIdentifiable(network,
"v3load",
"LOAD",
"V3");
"v3");
twt2.newPhaseTapChanger()
.setLowTapPosition(0)
.setTapPosition(1)
Expand Down

0 comments on commit 518d498

Please sign in to comment.