File tree Expand file tree Collapse file tree 3 files changed +47
-1
lines changed
iidm-impl/src/test/java/com/powsybl/iidm/network/impl/tck
iidm-serde/src/test/java/com/powsybl/iidm/serde
iidm-tck/src/test/java/com/powsybl/iidm/network/tck Expand file tree Collapse file tree 3 files changed +47
-1
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright (c) 2026, RTE (http://www.rte-france.com)
3+ * This Source Code Form is subject to the terms of the Mozilla Public
4+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+ * SPDX-License-Identifier: MPL-2.0
7+ */
8+ package com .powsybl .iidm .network .impl .tck ;
9+
10+ import com .powsybl .iidm .network .tck .AbstractIdentifiableTest ;
11+
12+ /**
13+ * @author Alice Caron {@literal <alice.caron at rte-france.com>}
14+ */
15+ class IdentifiableTest extends AbstractIdentifiableTest { }
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ void testRoundTrip() throws IOException {
2929 }
3030
3131 @ Test
32- void testCopy () throws IOException {
32+ void testCopy () {
3333 Network network = Network .read ("/twtOrdering.xiidm" , getNetworkAsStream ("/twtOrdering.xiidm" ));
3434 Network exportNetwork = NetworkSerDe .copy (network );
3535 assertEquals (exportNetwork .getTwoWindingsTransformers ().toString (), network .getTwoWindingsTransformers ().toString ());
Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright (c) 2026, RTE (http://www.rte-france.com)
3+ * This Source Code Form is subject to the terms of the Mozilla Public
4+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+ * SPDX-License-Identifier: MPL-2.0
7+ */
8+ package com .powsybl .iidm .network .tck ;
9+
10+ import com .powsybl .iidm .network .Network ;
11+ import com .powsybl .iidm .network .test .EurostagTutorialExample1Factory ;
12+ import org .junit .jupiter .api .Test ;
13+
14+ import static org .junit .jupiter .api .Assertions .assertEquals ;
15+
16+ /**
17+ * @author Alice Caron {@literal <alice.caron at rte-france.com>}
18+ */
19+ public abstract class AbstractIdentifiableTest {
20+
21+ @ Test
22+ public void test () {
23+ Network network = EurostagTutorialExample1Factory .create ();
24+
25+ // Test getSortIndex is implemented
26+ assertEquals (11 , network .getLine ("NHV1_NHV2_1" ).getSortIndex ());
27+ assertEquals (12 , network .getLine ("NHV1_NHV2_2" ).getSortIndex ());
28+ assertEquals (13 , network .getTwoWindingsTransformer ("NGEN_NHV1" ).getSortIndex ());
29+ assertEquals (14 , network .getTwoWindingsTransformer ("NHV2_NLOAD" ).getSortIndex ());
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments