From 295273cb37a71d7ad4ccb0dc976e51935c05bc65 Mon Sep 17 00:00:00 2001 From: Florian Dupuy Date: Wed, 4 Dec 2024 19:18:42 +0100 Subject: [PATCH 1/3] Remove unused fictitiousSwitch files Signed-off-by: Florian Dupuy --- .../iidm/serde/AbstractIidmSerDeTest.java | 14 +++ .../powsybl/iidm/serde/TopologyLevelTest.java | 8 +- .../V1_0/fictitiousSwitchRef-bbk.xml | 92 -------------- .../V1_0/fictitiousSwitchRef-bbr.xml | 85 ------------- .../V1_1/fictitiousSwitchRef-bbk.xml | 92 -------------- .../V1_1/fictitiousSwitchRef-bbr.xml | 85 ------------- .../V1_10/fictitiousSwitchRef-bbk.xml | 92 -------------- .../V1_10/fictitiousSwitchRef-bbr.xml | 85 ------------- .../V1_11/fictitiousSwitchRef-bbk.xml | 92 -------------- .../V1_11/fictitiousSwitchRef-bbr.xml | 85 ------------- .../V1_12/fictitiousSwitchRef-bbk.xml | 117 ------------------ .../V1_2/fictitiousSwitchRef-bbk.xml | 92 -------------- .../V1_2/fictitiousSwitchRef-bbr.xml | 85 ------------- .../V1_3/fictitiousSwitchRef-bbk.xml | 92 -------------- .../V1_3/fictitiousSwitchRef-bbr.xml | 85 ------------- .../V1_4/fictitiousSwitchRef-bbk.xml | 92 -------------- .../V1_4/fictitiousSwitchRef-bbr.xml | 85 ------------- .../V1_5/fictitiousSwitchRef-bbk.xml | 92 -------------- .../V1_5/fictitiousSwitchRef-bbr.xml | 85 ------------- .../V1_6/fictitiousSwitchRef-bbk.xml | 92 -------------- .../V1_6/fictitiousSwitchRef-bbr.xml | 85 ------------- .../V1_7/fictitiousSwitchRef-bbk.xml | 92 -------------- .../V1_7/fictitiousSwitchRef-bbr.xml | 85 ------------- .../V1_8/fictitiousSwitchRef-bbk.xml | 92 -------------- .../V1_8/fictitiousSwitchRef-bbr.xml | 85 ------------- .../V1_9/fictitiousSwitchRef-bbk.xml | 92 -------------- .../V1_9/fictitiousSwitchRef-bbr.xml | 85 ------------- .../{V1_13 => }/fictitiousSwitchRef-bbk.xml | 0 .../{V1_13 => }/fictitiousSwitchRef-bbr.xml | 0 ...tchRef-bbr.xml => fictitiousSwitchRef.xml} | 96 +++++++++----- 30 files changed, 86 insertions(+), 2273 deletions(-) delete mode 100644 iidm/iidm-serde/src/test/resources/V1_0/fictitiousSwitchRef-bbk.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_0/fictitiousSwitchRef-bbr.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_1/fictitiousSwitchRef-bbk.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_1/fictitiousSwitchRef-bbr.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_10/fictitiousSwitchRef-bbk.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_10/fictitiousSwitchRef-bbr.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_11/fictitiousSwitchRef-bbk.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_11/fictitiousSwitchRef-bbr.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_12/fictitiousSwitchRef-bbk.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_2/fictitiousSwitchRef-bbk.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_2/fictitiousSwitchRef-bbr.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_3/fictitiousSwitchRef-bbk.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_3/fictitiousSwitchRef-bbr.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_4/fictitiousSwitchRef-bbk.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_4/fictitiousSwitchRef-bbr.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_5/fictitiousSwitchRef-bbk.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_5/fictitiousSwitchRef-bbr.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_6/fictitiousSwitchRef-bbk.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_6/fictitiousSwitchRef-bbr.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_7/fictitiousSwitchRef-bbk.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_7/fictitiousSwitchRef-bbr.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_8/fictitiousSwitchRef-bbk.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_8/fictitiousSwitchRef-bbr.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_9/fictitiousSwitchRef-bbk.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_9/fictitiousSwitchRef-bbr.xml rename iidm/iidm-serde/src/test/resources/{V1_13 => }/fictitiousSwitchRef-bbk.xml (100%) rename iidm/iidm-serde/src/test/resources/{V1_13 => }/fictitiousSwitchRef-bbr.xml (100%) rename iidm/iidm-serde/src/test/resources/{V1_12/fictitiousSwitchRef-bbr.xml => fictitiousSwitchRef.xml} (52%) diff --git a/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/AbstractIidmSerDeTest.java b/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/AbstractIidmSerDeTest.java index d97190c1fa4..4afe4a7b7e2 100644 --- a/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/AbstractIidmSerDeTest.java +++ b/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/AbstractIidmSerDeTest.java @@ -157,6 +157,20 @@ protected void testWriteXmlAllPreviousVersions(Network network, ExportOptions ex testWriteVersionedXml(network, exportOptions, filename, allPreviousVersions(maxVersionExcluded)); } + /** + * Execute a write test for the given network and compare to the given xml reference resource + */ + protected void testWriteXml(Network network, String referencePath) throws IOException { + testWriteXml(network, new ExportOptions(), referencePath); + } + + /** + * Execute a write test for the given network and compare to the given xml reference resource + */ + protected void testWriteXml(Network network, ExportOptions exportOptions, String referencePath) throws IOException { + writeXmlTest(network, (n, p) -> NetworkSerDe.write(n, exportOptions, p), referencePath); + } + /** * Execute a write test for the given network, for all IIDM versions given, and compare to the given versioned xml * reference test resource. diff --git a/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/TopologyLevelTest.java b/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/TopologyLevelTest.java index 152a8055506..a2bad086e0b 100644 --- a/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/TopologyLevelTest.java +++ b/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/TopologyLevelTest.java @@ -43,13 +43,13 @@ void testConversion() throws IOException { private void testConversion(Network network) throws IOException { - ExportOptions options = new ExportOptions(); - testWriteVersionedXml(network, options.setTopologyLevel(TopologyLevel.NODE_BREAKER), "fictitiousSwitchRef.xml", CURRENT_IIDM_VERSION); + testWriteXml(network, "/fictitiousSwitchRef.xml"); network.getSwitchStream().forEach(sw -> sw.setRetained(false)); network.getSwitch("BJ").setRetained(true); - testWriteVersionedXml(network, options.setTopologyLevel(TopologyLevel.BUS_BREAKER), "fictitiousSwitchRef-bbk.xml", CURRENT_IIDM_VERSION); - testWriteVersionedXml(network, options.setTopologyLevel(TopologyLevel.BUS_BRANCH), "fictitiousSwitchRef-bbr.xml", CURRENT_IIDM_VERSION); + ExportOptions options = new ExportOptions(); + testWriteXml(network, options.setTopologyLevel(TopologyLevel.BUS_BREAKER), "/fictitiousSwitchRef-bbk.xml"); + testWriteXml(network, options.setTopologyLevel(TopologyLevel.BUS_BRANCH), "/fictitiousSwitchRef-bbr.xml"); } } diff --git a/iidm/iidm-serde/src/test/resources/V1_0/fictitiousSwitchRef-bbk.xml b/iidm/iidm-serde/src/test/resources/V1_0/fictitiousSwitchRef-bbk.xml deleted file mode 100644 index 5adac0ab970..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_0/fictitiousSwitchRef-bbk.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_0/fictitiousSwitchRef-bbr.xml b/iidm/iidm-serde/src/test/resources/V1_0/fictitiousSwitchRef-bbr.xml deleted file mode 100644 index f3e81cb85cc..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_0/fictitiousSwitchRef-bbr.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_1/fictitiousSwitchRef-bbk.xml b/iidm/iidm-serde/src/test/resources/V1_1/fictitiousSwitchRef-bbk.xml deleted file mode 100644 index 561915e10eb..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_1/fictitiousSwitchRef-bbk.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_1/fictitiousSwitchRef-bbr.xml b/iidm/iidm-serde/src/test/resources/V1_1/fictitiousSwitchRef-bbr.xml deleted file mode 100644 index bd2f91fb4eb..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_1/fictitiousSwitchRef-bbr.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_10/fictitiousSwitchRef-bbk.xml b/iidm/iidm-serde/src/test/resources/V1_10/fictitiousSwitchRef-bbk.xml deleted file mode 100644 index 88fd54c4eab..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_10/fictitiousSwitchRef-bbk.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_10/fictitiousSwitchRef-bbr.xml b/iidm/iidm-serde/src/test/resources/V1_10/fictitiousSwitchRef-bbr.xml deleted file mode 100644 index 4c6d8269be3..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_10/fictitiousSwitchRef-bbr.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_11/fictitiousSwitchRef-bbk.xml b/iidm/iidm-serde/src/test/resources/V1_11/fictitiousSwitchRef-bbk.xml deleted file mode 100644 index ffcf0972d74..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_11/fictitiousSwitchRef-bbk.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_11/fictitiousSwitchRef-bbr.xml b/iidm/iidm-serde/src/test/resources/V1_11/fictitiousSwitchRef-bbr.xml deleted file mode 100644 index cc6330aa348..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_11/fictitiousSwitchRef-bbr.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_12/fictitiousSwitchRef-bbk.xml b/iidm/iidm-serde/src/test/resources/V1_12/fictitiousSwitchRef-bbk.xml deleted file mode 100644 index 8b6a8102610..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_12/fictitiousSwitchRef-bbk.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_2/fictitiousSwitchRef-bbk.xml b/iidm/iidm-serde/src/test/resources/V1_2/fictitiousSwitchRef-bbk.xml deleted file mode 100644 index 5b14a51a6f7..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_2/fictitiousSwitchRef-bbk.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_2/fictitiousSwitchRef-bbr.xml b/iidm/iidm-serde/src/test/resources/V1_2/fictitiousSwitchRef-bbr.xml deleted file mode 100644 index e9aec872db5..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_2/fictitiousSwitchRef-bbr.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_3/fictitiousSwitchRef-bbk.xml b/iidm/iidm-serde/src/test/resources/V1_3/fictitiousSwitchRef-bbk.xml deleted file mode 100644 index 5f220100829..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_3/fictitiousSwitchRef-bbk.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_3/fictitiousSwitchRef-bbr.xml b/iidm/iidm-serde/src/test/resources/V1_3/fictitiousSwitchRef-bbr.xml deleted file mode 100644 index 9a21dd93a9a..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_3/fictitiousSwitchRef-bbr.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_4/fictitiousSwitchRef-bbk.xml b/iidm/iidm-serde/src/test/resources/V1_4/fictitiousSwitchRef-bbk.xml deleted file mode 100644 index 437794055f0..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_4/fictitiousSwitchRef-bbk.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_4/fictitiousSwitchRef-bbr.xml b/iidm/iidm-serde/src/test/resources/V1_4/fictitiousSwitchRef-bbr.xml deleted file mode 100644 index 6ce4d6a7185..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_4/fictitiousSwitchRef-bbr.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_5/fictitiousSwitchRef-bbk.xml b/iidm/iidm-serde/src/test/resources/V1_5/fictitiousSwitchRef-bbk.xml deleted file mode 100644 index 6776ec73fbb..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_5/fictitiousSwitchRef-bbk.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_5/fictitiousSwitchRef-bbr.xml b/iidm/iidm-serde/src/test/resources/V1_5/fictitiousSwitchRef-bbr.xml deleted file mode 100644 index 11574768418..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_5/fictitiousSwitchRef-bbr.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_6/fictitiousSwitchRef-bbk.xml b/iidm/iidm-serde/src/test/resources/V1_6/fictitiousSwitchRef-bbk.xml deleted file mode 100644 index 1a3f27b0e26..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_6/fictitiousSwitchRef-bbk.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_6/fictitiousSwitchRef-bbr.xml b/iidm/iidm-serde/src/test/resources/V1_6/fictitiousSwitchRef-bbr.xml deleted file mode 100644 index f1659b2a809..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_6/fictitiousSwitchRef-bbr.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_7/fictitiousSwitchRef-bbk.xml b/iidm/iidm-serde/src/test/resources/V1_7/fictitiousSwitchRef-bbk.xml deleted file mode 100644 index 6b2b8aa34af..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_7/fictitiousSwitchRef-bbk.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_7/fictitiousSwitchRef-bbr.xml b/iidm/iidm-serde/src/test/resources/V1_7/fictitiousSwitchRef-bbr.xml deleted file mode 100644 index fc2a92c8467..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_7/fictitiousSwitchRef-bbr.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_8/fictitiousSwitchRef-bbk.xml b/iidm/iidm-serde/src/test/resources/V1_8/fictitiousSwitchRef-bbk.xml deleted file mode 100644 index a76bd8056f6..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_8/fictitiousSwitchRef-bbk.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_8/fictitiousSwitchRef-bbr.xml b/iidm/iidm-serde/src/test/resources/V1_8/fictitiousSwitchRef-bbr.xml deleted file mode 100644 index 867a014617f..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_8/fictitiousSwitchRef-bbr.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_9/fictitiousSwitchRef-bbk.xml b/iidm/iidm-serde/src/test/resources/V1_9/fictitiousSwitchRef-bbk.xml deleted file mode 100644 index 530801a1193..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_9/fictitiousSwitchRef-bbk.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_9/fictitiousSwitchRef-bbr.xml b/iidm/iidm-serde/src/test/resources/V1_9/fictitiousSwitchRef-bbr.xml deleted file mode 100644 index ffd1e26a4d9..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_9/fictitiousSwitchRef-bbr.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iidm/iidm-serde/src/test/resources/V1_13/fictitiousSwitchRef-bbk.xml b/iidm/iidm-serde/src/test/resources/fictitiousSwitchRef-bbk.xml similarity index 100% rename from iidm/iidm-serde/src/test/resources/V1_13/fictitiousSwitchRef-bbk.xml rename to iidm/iidm-serde/src/test/resources/fictitiousSwitchRef-bbk.xml diff --git a/iidm/iidm-serde/src/test/resources/V1_13/fictitiousSwitchRef-bbr.xml b/iidm/iidm-serde/src/test/resources/fictitiousSwitchRef-bbr.xml similarity index 100% rename from iidm/iidm-serde/src/test/resources/V1_13/fictitiousSwitchRef-bbr.xml rename to iidm/iidm-serde/src/test/resources/fictitiousSwitchRef-bbr.xml diff --git a/iidm/iidm-serde/src/test/resources/V1_12/fictitiousSwitchRef-bbr.xml b/iidm/iidm-serde/src/test/resources/fictitiousSwitchRef.xml similarity index 52% rename from iidm/iidm-serde/src/test/resources/V1_12/fictitiousSwitchRef-bbr.xml rename to iidm/iidm-serde/src/test/resources/fictitiousSwitchRef.xml index f7321640120..19cbeaf41ec 100644 --- a/iidm/iidm-serde/src/test/resources/V1_12/fictitiousSwitchRef-bbr.xml +++ b/iidm/iidm-serde/src/test/resources/fictitiousSwitchRef.xml @@ -1,54 +1,95 @@ - - - - - + + + + + + + + + - - - - + topologyKind="NODE_BREAKER"> + + + + + + + + + + + targetV="0.0" targetQ="0.0" node="12"> + targetV="0.0" targetQ="0.0" node="14"> + targetP="21.789589" targetV="236.44736" targetQ="-20.701546" node="16" p="-21.789589" + q="20.693394"> - - - - + + + + + node1="2" voltageLevelId1="C" node2="10" voltageLevelId2="N" + selectedOperationalLimitsGroupId1="DEFAULT" selectedOperationalLimitsGroupId2="DEFAULT"> @@ -94,9 +135,8 @@ - + From dfd3a525f41bc88a086359c3018a8b39d53f7480 Mon Sep 17 00:00:00 2001 From: Florian Dupuy Date: Wed, 4 Dec 2024 19:24:22 +0100 Subject: [PATCH 2/3] Remove unused ActivePowerControl reference files Signed-off-by: Florian Dupuy --- .../extensions/ActivePowerControlXmlTest.java | 2 +- ...ctivePowerControlWithLimitRoundTripRef.xml | 38 ------------------- .../V1_13/activePowerControlRoundTripRef.xml | 38 ------------------- ...ctivePowerControlWithLimitRoundTripRef.xml | 0 4 files changed, 1 insertion(+), 77 deletions(-) delete mode 100644 iidm/iidm-serde/src/test/resources/V1_12/activePowerControlWithLimitRoundTripRef.xml delete mode 100644 iidm/iidm-serde/src/test/resources/V1_13/activePowerControlRoundTripRef.xml rename iidm/iidm-serde/src/test/resources/{V1_13 => }/activePowerControlWithLimitRoundTripRef.xml (100%) diff --git a/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/extensions/ActivePowerControlXmlTest.java b/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/extensions/ActivePowerControlXmlTest.java index e740ccce8a5..4aa77ed6495 100644 --- a/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/extensions/ActivePowerControlXmlTest.java +++ b/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/extensions/ActivePowerControlXmlTest.java @@ -51,7 +51,7 @@ public void setUp() throws IOException { void testTargetPLimits() throws IOException { network.getGenerator("GEN").getExtension(ActivePowerControl.class).setMaxTargetP(800.); network.getBattery("BAT").getExtension(ActivePowerControl.class).setMinTargetP(10.); - Network network2 = allFormatsRoundTripTest(network, "/activePowerControlWithLimitRoundTripRef.xml", CURRENT_IIDM_VERSION); + Network network2 = allFormatsRoundTripTest(network, "/activePowerControlWithLimitRoundTripRef.xml"); Generator gen2 = network2.getGenerator("GEN"); assertNotNull(gen2); diff --git a/iidm/iidm-serde/src/test/resources/V1_12/activePowerControlWithLimitRoundTripRef.xml b/iidm/iidm-serde/src/test/resources/V1_12/activePowerControlWithLimitRoundTripRef.xml deleted file mode 100644 index 27d9aac0b82..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_12/activePowerControlWithLimitRoundTripRef.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/iidm/iidm-serde/src/test/resources/V1_13/activePowerControlRoundTripRef.xml b/iidm/iidm-serde/src/test/resources/V1_13/activePowerControlRoundTripRef.xml deleted file mode 100644 index 919e6e77ec7..00000000000 --- a/iidm/iidm-serde/src/test/resources/V1_13/activePowerControlRoundTripRef.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/iidm/iidm-serde/src/test/resources/V1_13/activePowerControlWithLimitRoundTripRef.xml b/iidm/iidm-serde/src/test/resources/activePowerControlWithLimitRoundTripRef.xml similarity index 100% rename from iidm/iidm-serde/src/test/resources/V1_13/activePowerControlWithLimitRoundTripRef.xml rename to iidm/iidm-serde/src/test/resources/activePowerControlWithLimitRoundTripRef.xml From 42a92ed899848a09204a23c180613ee6367d753c Mon Sep 17 00:00:00 2001 From: Florian Dupuy Date: Mon, 9 Dec 2024 10:28:29 +0100 Subject: [PATCH 3/3] fix Signed-off-by: Florian Dupuy --- .../test/java/com/powsybl/iidm/serde/TopologyLevelTest.java | 1 - .../iidm/serde/extensions/ActivePowerControlXmlTest.java | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/TopologyLevelTest.java b/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/TopologyLevelTest.java index a2bad086e0b..9805d87ee59 100644 --- a/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/TopologyLevelTest.java +++ b/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/TopologyLevelTest.java @@ -15,7 +15,6 @@ import java.io.IOException; -import static com.powsybl.iidm.serde.IidmSerDeConstants.CURRENT_IIDM_VERSION; import static org.junit.jupiter.api.Assertions.assertEquals; /** diff --git a/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/extensions/ActivePowerControlXmlTest.java b/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/extensions/ActivePowerControlXmlTest.java index 4aa77ed6495..356bc76d27a 100644 --- a/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/extensions/ActivePowerControlXmlTest.java +++ b/iidm/iidm-serde/src/test/java/com/powsybl/iidm/serde/extensions/ActivePowerControlXmlTest.java @@ -21,10 +21,7 @@ import java.io.IOException; import java.util.OptionalDouble; -import static com.powsybl.iidm.serde.IidmSerDeConstants.CURRENT_IIDM_VERSION; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.*; /** * @author Ghiles Abdellah {@literal }