Skip to content

Commit

Permalink
rebase OK
Browse files Browse the repository at this point in the history
Signed-off-by: massifben <[email protected]>
  • Loading branch information
massifben committed Dec 15, 2023
1 parent e45fdaa commit 0712635
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,7 @@ private TInputs findInputs(SCL scd) {
.orElseThrow();

}

@Test
void updateIedNameBasedOnLnode_should_update_CompasFlow_and_ExtRef_iedName(){
// Given
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,23 @@ private static Stream<Arguments> provideLDevices() {
Arguments.of("LDevice with Inputs node should return stream 2 extrefs", tlDevice, 2));
}

@Test
void getCompasFlows_should_return_compasFlow(){
// Given
TLDevice tlDevice = new TLDevice();
tlDevice.setLN0(new LN0());
TInputs tInputs = new TInputs();
tlDevice.getLN0().setInputs(tInputs);
TPrivate tPrivate = new TPrivate();
tPrivate.setType(PrivateEnum.COMPAS_FLOW.getPrivateType());
tPrivate.getContent().add(new ObjectFactory().createFlow(new TCompasFlow()));
tInputs.getPrivate().add(tPrivate);
// When
Stream<TCompasFlow> result = extRefService.getCompasFlows(tlDevice);
// Then
assertThat(result).hasSize(1);
}

@Test
void getMatchingCompasFlows() {
//Given
Expand Down Expand Up @@ -147,7 +164,6 @@ void clearCompasFlowBinding() {
assertThat(compasFlow.getDataStreamKey()).isEqualTo("Desc_1");
}


@Test
void isExtRefFeedBySameControlBlock_should_return_true() {
// Given
Expand Down Expand Up @@ -199,7 +215,6 @@ private static Stream<Arguments> provideExtRefsToCompare() {
);
}


@Test
void filterDuplicatedExtRefs_should_remove_duplicated_extrefs() {
// Given
Expand Down Expand Up @@ -235,7 +250,6 @@ void filterDuplicatedExtRefs_should_not_remove_not_duplicated_extrefs() {
.hasSize(6);
}


private static TPrivate createPrivateCompasFlow(List<TCompasFlow> compasFlows) {
TPrivate tPrivate = new TPrivate();
tPrivate.setType(PrivateEnum.COMPAS_FLOW.getPrivateType());
Expand Down

0 comments on commit 0712635

Please sign in to comment.