Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/upgrade powsybl core to 4.10.1 #55

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ void tsStatsFunctions() throws IOException {
}

String output = outputStream.toString();
output = output.replaceAll("\r\n", "\n");
assertEquals("1.0\n0.2\n-5.0\n3.0\n1.0\n", output);

outputStream.reset();
Expand All @@ -279,6 +280,7 @@ void tsStatsFunctions() throws IOException {
}

output = outputStream.toString();
output = output.replaceAll("\r\n", "\n");
assertEquals("6.0\n2.0\n1.0\n3.0\n2.0\n", output);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ private void compareLogger(TimeSeriesMappingLogger logger, String expectedType,
try (BufferedWriter bufferedWriter = new BufferedWriter(loggerCsvOutput)) {
logger.writeCsv(bufferedWriter);
bufferedWriter.flush();
String loggerCsv = loggerCsvOutput.toString();
String loggerCsv = loggerCsvOutput.toString().replaceAll("\r\n", "\n");
String[] lines = loggerCsv.split("\n");
int nbLines = lines.length;
int nbExpectedLines = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ void provideTsNotMappedTest() throws Exception {
try (StringWriter sw = new StringWriter()) {
TimeSeriesMappingConfig mappingConfig = dsl.load(network, mappingParameters, store, sw, null);
assertEquals(ImmutableSet.of(new MappingKey(EquipmentVariable.targetP, "FSSV.O11_G")), mappingConfig.getGeneratorTimeSeries());
assertEquals("WARNING;Mapping script;provideTs - Time series can not be provided for id FSSV.O11_G because id is not mapped on targetP\n", sw.toString());
assertEquals("WARNING;Mapping script;provideTs - Time series can not be provided for id FSSV.O11_G because id is not mapped on targetP\n", sw.toString().replace("\r\n", "\n"));
}
}

Expand All @@ -265,7 +265,7 @@ void provideTsEmptyFilterTest() throws Exception {
try (StringWriter sw = new StringWriter()) {
TimeSeriesMappingConfig mappingConfig = dsl.load(network, mappingParameters, store, sw, null);
assertEquals(Collections.emptySet(), mappingConfig.getGeneratorTimeSeries());
assertEquals("WARNING;Mapping script;provideTs - Empty filtered list for equipment type GENERATOR and variables [targetP]\n", sw.toString());
assertEquals("WARNING;Mapping script;provideTs - Empty filtered list for equipment type GENERATOR and variables [targetP]\n", sw.toString().replaceAll("\r\n", "\n"));
}
}
}