Skip to content

Commit 29e6879

Browse files
committed
increase tests coverage
Signed-off-by: basseche <[email protected]>
1 parent b8624ee commit 29e6879

8 files changed

+196
-0
lines changed

src/test/java/org/gridsuite/network/map/NetworkMapControllerTest.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,24 @@ void setUp() {
532532
.setB2(386E-6 / 2)
533533
.add();
534534

535+
Line line4 = network.getLine("LINE4");
536+
line4.newOperationalLimitsGroup2("group1").newCurrentLimits()
537+
.setPermanentLimit(220.0)
538+
.beginTemporaryLimit()
539+
.setName("temporary1")
540+
.setAcceptableDuration(100)
541+
.setValue(50.)
542+
.setFictitious(false)
543+
.endTemporaryLimit()
544+
.beginTemporaryLimit()
545+
.setName("temporary2")
546+
.setAcceptableDuration(150)
547+
.setValue(70.)
548+
.setFictitious(false)
549+
.endTemporaryLimit()
550+
.add();
551+
line4.setSelectedOperationalLimitsGroup2("group1");
552+
535553
Battery b1 = vlnew2.newBattery()
536554
.setId("BATTERY1")
537555
.setName("BATTERY1")

src/test/resources/all-data-in-variant.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,26 @@
456456
"country2": "FR",
457457
"terminal1Connected": true,
458458
"terminal2Connected": true,
459+
"operationalLimitsGroup2": {
460+
"group1": {
461+
"permanentLimit": 220.0,
462+
"temporaryLimits": [
463+
{
464+
"name": "temporary2",
465+
"value": 70.0,
466+
"acceptableDuration": 150
467+
},
468+
{
469+
"name": "temporary1",
470+
"value": 50.0,
471+
"acceptableDuration": 100
472+
}
473+
],
474+
"applicability": null
475+
}
476+
},
477+
"operationalLimitsGroup2Names": ["group1"],
478+
"selectedOperationalLimitsGroup2": "group1",
459479
"r": 3.0,
460480
"x": 33.0,
461481
"g1": 0.0,

src/test/resources/all-data.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,26 @@
446446
"country2": "FR",
447447
"terminal1Connected": true,
448448
"terminal2Connected": true,
449+
"operationalLimitsGroup2": {
450+
"group1": {
451+
"permanentLimit": 220.0,
452+
"temporaryLimits": [
453+
{
454+
"name": "temporary2",
455+
"value": 70.0,
456+
"acceptableDuration": 150
457+
},
458+
{
459+
"name": "temporary1",
460+
"value": 50.0,
461+
"acceptableDuration": 100
462+
}
463+
],
464+
"applicability": null
465+
}
466+
},
467+
"operationalLimitsGroup2Names": ["group1"],
468+
"selectedOperationalLimitsGroup2": "group1",
449469
"r": 3.0,
450470
"x": 33.0,
451471
"g1": 0.0,

src/test/resources/lines-form-data.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,45 @@
316316
"voltageLevelId2": "VLGEN3",
317317
"terminal1Connected": true,
318318
"terminal2Connected": true,
319+
"currentLimits2": [
320+
{
321+
"id": "group1",
322+
"permanentLimit": 220.0,
323+
"temporaryLimits": [
324+
{
325+
"name": "temporary2",
326+
"value": 70.0,
327+
"acceptableDuration": 150
328+
},
329+
{
330+
"name": "temporary1",
331+
"value": 50.0,
332+
"acceptableDuration": 100
333+
}
334+
],
335+
"applicability": null
336+
}
337+
],
338+
"currentLimits": [
339+
{
340+
"id": "group1",
341+
"permanentLimit": 220.0,
342+
"temporaryLimits": [
343+
{
344+
"name": "temporary2",
345+
"value": 70.0,
346+
"acceptableDuration": 150
347+
},
348+
{
349+
"name": "temporary1",
350+
"value": 50.0,
351+
"acceptableDuration": 100
352+
}
353+
],
354+
"applicability": "SIDE2"
355+
}
356+
],
357+
"selectedOperationalLimitsGroup2": "group1",
319358
"r": 3.0,
320359
"x": 33.0,
321360
"g1": 0.0,

src/test/resources/partial-all-data-in-variant.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@
4141
"country2": "FR",
4242
"terminal1Connected": true,
4343
"terminal2Connected": true,
44+
"operationalLimitsGroup2": {
45+
"group1": {
46+
"permanentLimit": 220.0,
47+
"temporaryLimits": [
48+
{
49+
"name": "temporary2",
50+
"value": 70.0,
51+
"acceptableDuration": 150
52+
},
53+
{
54+
"name": "temporary1",
55+
"value": 50.0,
56+
"acceptableDuration": 100
57+
}
58+
],
59+
"applicability": null
60+
}
61+
},
62+
"operationalLimitsGroup2Names": ["group1"],
63+
"selectedOperationalLimitsGroup2": "group1",
4464
"r": 3.0,
4565
"x": 33.0,
4666
"g1": 0.0,

src/test/resources/partial-all-data.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,26 @@
121121
"country2": "FR",
122122
"terminal1Connected": true,
123123
"terminal2Connected": true,
124+
"operationalLimitsGroup2": {
125+
"group1": {
126+
"permanentLimit": 220.0,
127+
"temporaryLimits": [
128+
{
129+
"name": "temporary2",
130+
"value": 70.0,
131+
"acceptableDuration": 150
132+
},
133+
{
134+
"name": "temporary1",
135+
"value": 50.0,
136+
"acceptableDuration": 100
137+
}
138+
],
139+
"applicability": null
140+
}
141+
},
142+
"operationalLimitsGroup2Names": ["group1"],
143+
"selectedOperationalLimitsGroup2": "group1",
124144
"r": 3.0,
125145
"x": 33.0,
126146
"g1": 0.0,

src/test/resources/partial-all-map-data-no-redundant-lines.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,26 @@
5959
"country2": "FR",
6060
"terminal1Connected": true,
6161
"terminal2Connected": true,
62+
"operationalLimitsGroup2": {
63+
"group1": {
64+
"permanentLimit": 220.0,
65+
"temporaryLimits": [
66+
{
67+
"name": "temporary2",
68+
"value": 70.0,
69+
"acceptableDuration": 150
70+
},
71+
{
72+
"name": "temporary1",
73+
"value": 50.0,
74+
"acceptableDuration": 100
75+
}
76+
],
77+
"applicability": null
78+
}
79+
},
80+
"operationalLimitsGroup2Names": ["group1"],
81+
"selectedOperationalLimitsGroup2": "group1",
6282
"r": 3.0,
6383
"x": 33.0,
6484
"g1": 0.0,

src/test/resources/partial-lines-form-data.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,45 @@
55
"voltageLevelId2": "VLGEN3",
66
"terminal1Connected": true,
77
"terminal2Connected": true,
8+
"currentLimits2": [
9+
{
10+
"id": "group1",
11+
"permanentLimit": 220.0,
12+
"temporaryLimits": [
13+
{
14+
"name": "temporary2",
15+
"value": 70.0,
16+
"acceptableDuration": 150
17+
},
18+
{
19+
"name": "temporary1",
20+
"value": 50.0,
21+
"acceptableDuration": 100
22+
}
23+
],
24+
"applicability": null
25+
}
26+
],
27+
"currentLimits": [
28+
{
29+
"id": "group1",
30+
"permanentLimit": 220.0,
31+
"temporaryLimits": [
32+
{
33+
"name": "temporary2",
34+
"value": 70.0,
35+
"acceptableDuration": 150
36+
},
37+
{
38+
"name": "temporary1",
39+
"value": 50.0,
40+
"acceptableDuration": 100
41+
}
42+
],
43+
"applicability": "SIDE2"
44+
}
45+
],
46+
"selectedOperationalLimitsGroup2": "group1",
847
"r": 3.0,
948
"x": 33.0,
1049
"g1": 0.0,

0 commit comments

Comments
 (0)