@@ -153,44 +153,34 @@ void updateAllSourceDataSetsAndControlBlocks_should_create_dataset_and_fcda_for_
153
153
public static Stream <Arguments > provideCreateFCDA () {
154
154
return Stream .of (
155
155
Arguments .of (named ("should include signal internal to a Bay" ,
156
- "test bay internal" ),
157
- "IED_NAME2/LD_INST21/DS_LD_INST21_GSI" ,
156
+ "test bay internal" ), "IED_NAME2/LD_INST21/DS_LD_INST21_GSI" ,
158
157
List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "DoName" , "daNameST" , TFCEnum .ST ))),
159
158
Arguments .of (named ("should include signal external to a Bay" ,
160
- "test bay external" ),
161
- "IED_NAME3/LD_INST31/DS_LD_INST31_GSE" ,
159
+ "test bay external" ), "IED_NAME3/LD_INST31/DS_LD_INST31_GSE" ,
162
160
List .of (new FCDARecord ("LD_INST31" , "ANCR" , "1" , "" , "DoName" , "daNameST" , TFCEnum .ST ))),
163
161
Arguments .of (named ("keep source DA with fc = ST" ,
164
- "test daName ST" ),
165
- "IED_NAME2/LD_INST21/DS_LD_INST21_GSI" ,
162
+ "test daName ST" ), "IED_NAME2/LD_INST21/DS_LD_INST21_GSI" ,
166
163
List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "DoName" , "daNameST" , TFCEnum .ST ))),
167
164
Arguments .of (named ("keep source DA with fc = MX" ,
168
- "test daName MX" ),
169
- "IED_NAME2/LD_INST21/DS_LD_INST21_GMI" ,
165
+ "test daName MX" ), "IED_NAME2/LD_INST21/DS_LD_INST21_GMI" ,
170
166
List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "DoName" , "daNameMX" , TFCEnum .MX ))),
171
167
Arguments .of (named ("for GOOSE, should keep only valid fcda candidates" ,
172
- "test ServiceType is GOOSE, no daName and DO contains ST and MX, but only ST is FCDA candidate" ),
173
- "IED_NAME2/LD_INST21/DS_LD_INST21_GSI" ,
168
+ "test ServiceType is GOOSE, no daName and DO contains ST and MX, but only ST is FCDA candidate" ), "IED_NAME2/LD_INST21/DS_LD_INST21_GSI" ,
174
169
List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "OtherDoName" , "daNameST" , TFCEnum .ST ))),
175
170
Arguments .of (named ("for SMV, should keep only valid fcda candidates" ,
176
- "test ServiceType is SMV, no daName and DO contains ST and MX, but only ST is FCDA candidate" ),
177
- "IED_NAME2/LD_INST21/DS_LD_INST21_SVI" ,
171
+ "test ServiceType is SMV, no daName and DO contains ST and MX, but only ST is FCDA candidate" ), "IED_NAME2/LD_INST21/DS_LD_INST21_SVI" ,
178
172
List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "OtherDoName" , "daNameST" , TFCEnum .ST ))),
179
173
Arguments .of (named ("for Report, should get source daName from ExtRef.desc to deduce FC ST" ,
180
- "test ServiceType is Report_daReportST_1" ),
181
- "IED_NAME2/LD_INST21/DS_LD_INST21_DQCI" ,
174
+ "test ServiceType is Report_daReportST_1" ), "IED_NAME2/LD_INST21/DS_LD_INST21_DQCI" ,
182
175
List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "DoName" , null , TFCEnum .ST ))),
183
176
Arguments .of (named ("for Report, should get source daName from ExtRef.desc to deduce FC MX" ,
184
- "test ServiceType is Report_daReportMX_1" ),
185
- "IED_NAME2/LD_INST21/DS_LD_INST21_CYCI" ,
177
+ "test ServiceType is Report_daReportMX_1" ), "IED_NAME2/LD_INST21/DS_LD_INST21_CYCI" ,
186
178
List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "DoName" , null , TFCEnum .MX ))),
187
179
Arguments .of (named ("should ignore instance number when checking FCDA Candidate file" ,
188
- "test no daName and doName with instance number" ),
189
- "IED_NAME2/LD_INST21/DS_LD_INST21_GSI" ,
180
+ "test no daName and doName with instance number" ), "IED_NAME2/LD_INST21/DS_LD_INST21_GSI" ,
190
181
List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "DoWithInst1" , "daNameST" , TFCEnum .ST ))),
191
182
Arguments .of (named ("should ignore instance number when checking FCDA Candidate file (DO with SDO)" ,
192
- "test no daName and doName with instance number and SDO" ),
193
- "IED_NAME2/LD_INST21/DS_LD_INST21_GSI" ,
183
+ "test no daName and doName with instance number and SDO" ), "IED_NAME2/LD_INST21/DS_LD_INST21_GSI" ,
194
184
List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "DoWithInst2.subDo" , "daNameST" , TFCEnum .ST )))
195
185
);
196
186
}
@@ -214,26 +204,6 @@ void updateAllSourceDataSetsAndControlBlocks_when_no_valid_source_Da_found_shoul
214
204
.allMatch (ln0Adapter -> !ln0Adapter .getCurrentElem ().isSetDataSet ());
215
205
}
216
206
217
- @ ParameterizedTest
218
- @ MethodSource ("provideDoCreateFCDA" )
219
- void updateAllSourceDataSetsAndControlBlocks_when_valid_source_Da_found_should_create_FCDA (String extRefDesc , String extRefIedName ) {
220
- // Given
221
- SCL scd = SclTestMarshaller .getSCLFromFile ("/scd-extref-create-dataset-and-controlblocks/scd_create_dataset_and_controlblocks_success.xml" );
222
- SclRootAdapter sclRootAdapter = new SclRootAdapter (scd );
223
- InputsAdapter inputsAdapter = keepOnlyThisExtRef (sclRootAdapter , extRefDesc );
224
- DACOMM dacomm = DaComTestMarshallerHelper .getDACOMMFromFile ("/cb_comm/Template_DA_COMM_v1.xml" );
225
- // When
226
- List <SclReportItem > sclReportItems = inputsAdapter .updateAllSourceDataSetsAndControlBlocks (dacomm .getFCDAs ().getFCDA ());
227
- // Then
228
- assertThat (sclReportItems ).isEmpty ();
229
- assertThat (sclRootAdapter .streamIEDAdapters ()
230
- .filter (iedAdapter -> iedAdapter .getName ().equals (extRefIedName ))
231
- .flatMap (IEDAdapter ::streamLDeviceAdapters )
232
- .filter (LDeviceAdapter ::hasLN0 )
233
- .map (LDeviceAdapter ::getLN0Adapter ))
234
- .allMatch (ln0Adapter -> ln0Adapter .getCurrentElem ().isSetDataSet ());
235
- }
236
-
237
207
public static Stream <Arguments > provideDoNotCreateFCDA () {
238
208
return Stream .of (
239
209
Arguments .of (named ("should not create FCDA for source Da different from MX and ST" ,
@@ -245,13 +215,6 @@ public static Stream<Arguments> provideDoNotCreateFCDA() {
245
215
);
246
216
}
247
217
248
- public static Stream <Arguments > provideDoCreateFCDA () {
249
- return Stream .of (
250
- Arguments .of (named ("should create FCDA" , "test bay internal" ), "IED_NAME2" ),
251
- Arguments .of (named ("should create FCDA" , "test bay external" ), "IED_NAME3" )
252
- );
253
- }
254
-
255
218
@ Test
256
219
void updateAllSourceDataSetsAndControlBlocks_when_AccessPoint_does_not_have_dataset_creation_capability_should_report_error () {
257
220
// Given
0 commit comments