Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fix(#449): fix test in LNodeStatusServiceTest" #455

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,14 @@ void updateLnStatusBasedOnPrivateLNodeStatus_should_update_Mod_stVal(String ldIn

public static Stream<Arguments> provideUpdateModStVal() {
return Stream.of(
// Tests on LN
Arguments.of(named("LN 'on;off' to set to 'on'", "LDEVICE_1"), "PDIS", "1", "on"),
Arguments.of(named("LN 'off;on' to set to 'on'", "LDEVICE_1"), "PDIS", "2", "on"),
Arguments.of(named("LN 'on' to set to 'on'", "LDEVICE_1"), "PDIS", "3", "on"),
Arguments.of(named("LN 'on;off' to set to 'off'", "LDEVICE_1"), "PDIS", "4", "off"),
Arguments.of(named("LN 'off;on' to set to 'off'", "LDEVICE_1"), "PDIS", "5", "off"),
Arguments.of(named("LN 'off' to set to 'off'", "LDEVICE_1"), "PDIS", "6", "off"),
// Tests on LN0
Arguments.of(named("LN0 'on;off' to set to 'on'", "LDEVICE_1"), "LLN0", "", "on"),
Arguments.of(named("LN0 'off;on' to set to 'on'", "LDEVICE_2"), "LLN0", "", "on"),
Arguments.of(named("LN0 'on' to set to 'on'", "LDEVICE_3"), "LLN0", "", "on"),
Arguments.of(named("LN0 'on;off' to set to 'off'", "LDEVICE_4"), "LLN0", "", "off"),
Arguments.of(named("LN0 'off;on' to set to 'off'", "LDEVICE_5"), "LLN0", "", "off"),
Arguments.of(named("LN0 'off' to set to 'off'", "LDEVICE_6"), "LLN0", "", "off")
Arguments.of(named("LN 'on' à mettre à 'on'", "LDEVICE_1"), "PDIS", "1", "on"),
Arguments.of(named("LN 'off;on' à mettre à 'on'", "LDEVICE_1"), "PDIS", "2", "on"),
Arguments.of(named("LN 'off' à mettre à 'off'", "LDEVICE_1"), "PDIS", "3", "off"),
Arguments.of(named("LN 'off;on' à mettre à 'off'", "LDEVICE_1"), "PDIS", "3", "off"),
Arguments.of(named("LN0 'on' à mettre à 'on'", "LDEVICE_1"), "LLN0", "", "on"),
Arguments.of(named("LN0 'off;on' à mettre à 'on'", "LDEVICE_2"), "LLN0", "", "on"),
Arguments.of(named("LN0 'off' à mettre à 'off'", "LDEVICE_3"), "LLN0", "", "off"),
Arguments.of(named("LN0 'off;on' à mettre à 'off'", "LDEVICE_4"), "LLN0", "", "off")
);
}

Expand Down
54 changes: 7 additions & 47 deletions sct-commons/src/test/resources/scl-lnodestatus/lnodestatus.scd
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,9 @@
<Private type="COMPAS-LNodeStatus">on</Private>
</LNode>
<LNode iedName="IED_NAME_1" ldInst="LDEVICE_1" lnClass="PDIS" lnInst="3">
<Private type="COMPAS-LNodeStatus">on</Private>
</LNode>
<LNode iedName="IED_NAME_1" ldInst="LDEVICE_1" lnClass="PDIS" lnInst="4">
<Private type="COMPAS-LNodeStatus">off</Private>
</LNode>
<LNode iedName="IED_NAME_1" ldInst="LDEVICE_1" lnClass="PDIS" lnInst="5">
<Private type="COMPAS-LNodeStatus">off</Private>
</LNode>
<LNode iedName="IED_NAME_1" ldInst="LDEVICE_1" lnClass="PDIS" lnInst="6">
<LNode iedName="IED_NAME_1" ldInst="LDEVICE_1" lnClass="PDIS" lnInst="4">
<Private type="COMPAS-LNodeStatus">off</Private>
</LNode>
</Function>
Expand All @@ -40,15 +34,9 @@
<Private type="COMPAS-LNodeStatus">on</Private>
</LNode>
<LNode iedName="IED_NAME_1" ldInst="LDEVICE_3" lnClass="LLN0">
<Private type="COMPAS-LNodeStatus">on</Private>
</LNode>
<LNode iedName="IED_NAME_1" ldInst="LDEVICE_4" lnClass="LLN0">
<Private type="COMPAS-LNodeStatus">off</Private>
</LNode>
<LNode iedName="IED_NAME_1" ldInst="LDEVICE_5" lnClass="LLN0">
<Private type="COMPAS-LNodeStatus">off</Private>
</LNode>
<LNode iedName="IED_NAME_1" ldInst="LDEVICE_6" lnClass="LLN0">
<LNode iedName="IED_NAME_1" ldInst="LDEVICE_4" lnClass="LLN0">
<Private type="COMPAS-LNodeStatus">off</Private>
</LNode>
</Function>
Expand All @@ -61,7 +49,7 @@
<Authentication/>
<LDevice inst="LDEVICE_1">
<LN0 lnType="lnType1" lnClass="LLN0" inst="">
<Private type="COMPAS-LNodeStatus">on;off</Private>
<Private type="COMPAS-LNodeStatus">on</Private>
<DOI name="Mod">
<DAI name="stVal"/>
</DOI>
Expand All @@ -73,69 +61,41 @@
</DOI>
</LN>
<LN lnType="lnType2" lnClass="PDIS" inst="2">
<Private type="COMPAS-LNodeStatus">off;on</Private>
<DOI name="Mod">
<DAI name="stVal"/>
</DOI>
</LN>
<LN lnType="lnType2" lnClass="PDIS" inst="3">
<Private type="COMPAS-LNodeStatus">on</Private>
<DOI name="Mod">
<DAI name="stVal"/>
</DOI>
</LN>
<LN lnType="lnType2" lnClass="PDIS" inst="4">
<LN lnType="lnType2" lnClass="PDIS" inst="3">
<Private type="COMPAS-LNodeStatus">on;off</Private>
<DOI name="Mod">
<DAI name="stVal"/>
</DOI>
</LN>
<LN lnType="lnType2" lnClass="PDIS" inst="5">
<Private type="COMPAS-LNodeStatus">off;on</Private>
<DOI name="Mod">
<DAI name="stVal"/>
</DOI>
</LN>
<LN lnType="lnType2" lnClass="PDIS" inst="6">
<LN lnType="lnType2" lnClass="PDIS" inst="4">
<Private type="COMPAS-LNodeStatus">off</Private>
<DOI name="Mod">
<DAI name="stVal"/>
</DOI>
</LN>
</LDevice>
<LDevice inst="LDEVICE_2">
<LN0 lnType="lnType1" lnClass="LLN0" inst="">
<Private type="COMPAS-LNodeStatus">off;on</Private>
<DOI name="Mod">
<DAI name="stVal"/>
</DOI>
</LN0>
</LDevice>
<LDevice inst="LDEVICE_3">
<LN0 lnType="lnType1" lnClass="LLN0" inst="">
<Private type="COMPAS-LNodeStatus">on</Private>
<DOI name="Mod">
<DAI name="stVal"/>
</DOI>
</LN0>
</LDevice>
<LDevice inst="LDEVICE_4">
<LDevice inst="LDEVICE_3">
<LN0 lnType="lnType1" lnClass="LLN0" inst="">
<Private type="COMPAS-LNodeStatus">on;off</Private>
<DOI name="Mod">
<DAI name="stVal"/>
</DOI>
</LN0>
</LDevice>
<LDevice inst="LDEVICE_5">
<LN0 lnType="lnType1" lnClass="LLN0" inst="">
<Private type="COMPAS-LNodeStatus">off;on</Private>
<DOI name="Mod">
<DAI name="stVal"/>
</DOI>
</LN0>
</LDevice>
<LDevice inst="LDEVICE_6">
<LDevice inst="LDEVICE_4">
<LN0 lnType="lnType1" lnClass="LLN0" inst="">
<Private type="COMPAS-LNodeStatus">off</Private>
<DOI name="Mod">
Expand Down
Loading