From 1ef433ea2f878d62d53cf5d7fceb8cc019f896fc Mon Sep 17 00:00:00 2001 From: Etienne LESOT Date: Thu, 5 Feb 2026 15:11:01 +0100 Subject: [PATCH] network modification v0.64.0 Signed-off-by: Etienne LESOT --- pom.xml | 2 +- .../VoltageLevelByFormulaModificationTest.java | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index fc4c065eb..22deb4716 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ **/migration/**/* gridsuite org.gridsuite:network-modification-server - 0.62.0 + 0.63.0 1.38.0 diff --git a/src/test/java/org/gridsuite/modification/server/modifications/byfilter/formula/VoltageLevelByFormulaModificationTest.java b/src/test/java/org/gridsuite/modification/server/modifications/byfilter/formula/VoltageLevelByFormulaModificationTest.java index f0d79d526..e068800a2 100644 --- a/src/test/java/org/gridsuite/modification/server/modifications/byfilter/formula/VoltageLevelByFormulaModificationTest.java +++ b/src/test/java/org/gridsuite/modification/server/modifications/byfilter/formula/VoltageLevelByFormulaModificationTest.java @@ -23,8 +23,7 @@ import java.util.Date; import java.util.List; -import static org.gridsuite.modification.modifications.byfilter.AbstractModificationByAssignment.REPORT_KEY_BY_FILTER_MODIFICATION_SOME; -import static org.gridsuite.modification.modifications.byfilter.AbstractModificationByAssignment.REPORT_KEY_EQUIPMENT_MODIFIED_ERROR_NULL; +import static org.gridsuite.modification.modifications.byfilter.AbstractModificationByAssignment.*; import static org.gridsuite.modification.server.utils.TestUtils.assertLogMessageWithoutRank; import static org.junit.jupiter.api.Assertions.*; @@ -170,8 +169,15 @@ protected List getFormulaInfos() { ReferenceFieldOrValue.builder().equipmentField(VoltageLevelField.LOW_SHORT_CIRCUIT_CURRENT_LIMIT.name()).build() ); + FormulaInfos formulaInfos10 = getFormulaInfo(VoltageLevelField.LOW_VOLTAGE_LIMIT.name(), + List.of(filter6), + Operator.DIVISION, + ReferenceFieldOrValue.builder().value(100.).build(), + ReferenceFieldOrValue.builder().value(0.).build() + ); + return List.of(formulaInfos1, formulaInfos2, formulaInfos3, formulaInfos4, formulaInfos5, - formulaInfos6, formulaInfos7, formulaInfos8, formulaInfos9); + formulaInfos6, formulaInfos7, formulaInfos8, formulaInfos9, formulaInfos10); } @Override @@ -239,8 +245,9 @@ protected void assertAfterNetworkModificationCreation() { assertTrue(Double.isNaN(getNetwork().getVoltageLevel(VOLTAGE_LEVEL_ID_7).getLowVoltageLimit())); assertTrue(Double.isNaN(getNetwork().getVoltageLevel(VOLTAGE_LEVEL_ID_7).getHighVoltageLimit())); - assertLogMessageWithoutRank("Cannot modify equipment v7 : At least one of the value or referenced field is null", REPORT_KEY_EQUIPMENT_MODIFIED_ERROR_NULL, reportService); - assertLogMessageWithoutRank("Some of the equipment have been modified : 14 equipment(s) modified and 4 equipment(s) not modified", REPORT_KEY_BY_FILTER_MODIFICATION_SOME, reportService); + assertLogMessageWithoutRank("Cannot modify equipment v7 : At least one of the value or referenced field is not a number", REPORT_KEY_EQUIPMENT_MODIFIED_ERROR_NAN, reportService); + assertLogMessageWithoutRank("Cannot modify equipment v7 : The value or referenced field of the second operand in the division operator is zero", REPORT_KEY_EQUIPMENT_MODIFIED_ERROR_ZERO, reportService); + assertLogMessageWithoutRank("Some of the equipment have been modified : 14 equipment(s) modified and 5 equipment(s) not modified", REPORT_KEY_BY_FILTER_MODIFICATION_SOME, reportService); } @Override