@@ -153,44 +153,34 @@ void updateAllSourceDataSetsAndControlBlocks_should_create_dataset_and_fcda_for_
153153 public static Stream <Arguments > provideCreateFCDA () {
154154 return Stream .of (
155155 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" ,
158157 List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "DoName" , "daNameST" , TFCEnum .ST ))),
159158 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" ,
162160 List .of (new FCDARecord ("LD_INST31" , "ANCR" , "1" , "" , "DoName" , "daNameST" , TFCEnum .ST ))),
163161 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" ,
166163 List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "DoName" , "daNameST" , TFCEnum .ST ))),
167164 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" ,
170166 List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "DoName" , "daNameMX" , TFCEnum .MX ))),
171167 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" ,
174169 List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "OtherDoName" , "daNameST" , TFCEnum .ST ))),
175170 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" ,
178172 List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "OtherDoName" , "daNameST" , TFCEnum .ST ))),
179173 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" ,
182175 List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "DoName" , null , TFCEnum .ST ))),
183176 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" ,
186178 List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "DoName" , null , TFCEnum .MX ))),
187179 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" ,
190181 List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "DoWithInst1" , "daNameST" , TFCEnum .ST ))),
191182 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" ,
194184 List .of (new FCDARecord ("LD_INST21" , "ANCR" , "1" , "" , "DoWithInst2.subDo" , "daNameST" , TFCEnum .ST )))
195185 );
196186 }
@@ -214,26 +204,6 @@ void updateAllSourceDataSetsAndControlBlocks_when_no_valid_source_Da_found_shoul
214204 .allMatch (ln0Adapter -> !ln0Adapter .getCurrentElem ().isSetDataSet ());
215205 }
216206
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-
237207 public static Stream <Arguments > provideDoNotCreateFCDA () {
238208 return Stream .of (
239209 Arguments .of (named ("should not create FCDA for source Da different from MX and ST" ,
@@ -245,13 +215,6 @@ public static Stream<Arguments> provideDoNotCreateFCDA() {
245215 );
246216 }
247217
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-
255218 @ Test
256219 void updateAllSourceDataSetsAndControlBlocks_when_AccessPoint_does_not_have_dataset_creation_capability_should_report_error () {
257220 // Given
0 commit comments