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
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,6 @@ public List<Country> getCountries(@Parameter(description = "Network UUID") @Path
})
public List<Double> getNominalVoltages(@Parameter(description = "Network UUID") @PathVariable("networkUuid") UUID networkUuid,
@Parameter(description = "Variant ID") @RequestParam(name = "variantId", required = false) String variantId) {
return networkMapService.getNominalVoltages(networkUuid, variantId).stream().sorted().toList();
return networkMapService.getNominalVoltages(networkUuid, variantId).stream().sorted(Comparator.reverseOrder()).toList();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2456,8 +2456,8 @@ void shouldReturnNullableSubstationIdForVoltageLevel() throws Exception {

@Test
void shouldReturnNominalVoltages() throws Exception {
succeedingTestForNominalVoltages(NETWORK_UUID, null, List.of(24.0, 150.0, 225.0, 380.0).toString());
succeedingTestForNominalVoltages(NETWORK_UUID, VARIANT_ID_2, List.of(24.0, 150.0, 225.0, 380.0, 400.0).toString());
succeedingTestForNominalVoltages(NETWORK_UUID, null, List.of(380.0, 225.0, 150.0, 24.0).toString());
succeedingTestForNominalVoltages(NETWORK_UUID, VARIANT_ID_2, List.of(400.0, 380.0, 225.0, 150.0, 24.0).toString());
}

@Test
Expand Down