Skip to content
Merged
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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<sonar.coverage.exclusions>**/migration/**/*</sonar.coverage.exclusions>
<sonar.organization>gridsuite</sonar.organization>
<sonar.projectKey>org.gridsuite:network-modification-server</sonar.projectKey>
<network-modification.version>0.62.0</network-modification.version>
<network-modification.version>0.63.0</network-modification.version>
<!-- TODO network-store.version remove when included in powsybl-ws-dependencies -->
<network-store-client.version>1.38.0</network-store-client.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;

Expand Down Expand Up @@ -170,8 +169,15 @@ protected List<FormulaInfos> 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
Expand Down Expand Up @@ -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
Expand Down