@@ -35,11 +35,13 @@ void enrich_WhenPassingCase1_ThenSCDUpdated() throws Exception {
35
35
writeFile (filename + "-updated.scd" , scl );
36
36
37
37
assertXYCoordinates (scl .getElement (), "//scl:VoltageLevel[@name='J1']" , 2 , 4 );
38
- assertXYCoordinates (scl .getElement (), "//scl:Bay[@name='BusBar A']" , 1 , 15 );
38
+ assertXYCoordinates (scl .getElement (), "//scl:VoltageLevel[@name='J1']/scl:Bay[@name='BusBar A']" , 1 , 15 );
39
+ assertXYCoordinates (scl .getElement (), "//scl:VoltageLevel[@name='J1']/scl:Bay[@name='Bay 1S']" , 2 , 13 );
40
+ assertXYCoordinates (scl .getElement (), "//scl:VoltageLevel[@name='J1']/scl:Bay[@name='Bay 1S']/scl:ConductingEquipment[@name='CBR1']" , 1 , 1 );
39
41
}
40
42
41
43
@ Test
42
- void enrich_WhenPassingCase2_ThenSCDUpdated () throws IOException {
44
+ void enrich_WhenPassingCase2_ThenSCDUpdated () throws Exception {
43
45
// The JSON file used here is a copy created by the testcase
44
46
// SclAutoAlignmentServiceTest#createJson_WhenPassingCase2_ThenJsonReturned
45
47
var filename = "scl-2" ;
@@ -51,6 +53,12 @@ void enrich_WhenPassingCase2_ThenSCDUpdated() throws IOException {
51
53
52
54
assertNotNull (scl .getElement ());
53
55
writeFile (filename + "-updated.scd" , scl );
56
+
57
+ assertXYCoordinates (scl .getElement (), "//scl:PowerTransformer[@name='T4']" , 27 , 3 );
58
+ assertXYCoordinates (scl .getElement (), "//scl:VoltageLevel[@name='S1 380kV']" , 2 , 7 );
59
+ assertXYCoordinates (scl .getElement (), "//scl:VoltageLevel[@name='S1 380kV']/scl:Bay[@name='BUSBAR10']" , 1 , 12 );
60
+ assertXYCoordinates (scl .getElement (), "//scl:VoltageLevel[@name='S1 380kV']/scl:Bay[@name='BAY_T4_2']" , 1 , 4 );
61
+ assertXYCoordinates (scl .getElement (), "//scl:VoltageLevel[@name='S1 380kV']/scl:Bay[@name='BAY_T4_2']/scl:ConductingEquipment[@name='BREAKER25']" , 1 , 4 );
54
62
}
55
63
56
64
private Element readSCLElement (String filename ) throws IOException {
0 commit comments