From edf44a7fcc351eb304bc2f84e8d71414014cb0c0 Mon Sep 17 00:00:00 2001 From: talio Date: Tue, 14 Nov 2017 16:07:58 +0200 Subject: forwarder test add unit tests for forwarder healer Issue-Id : SDC-653 Change-Id: I06954e855aac09d16422929203926aa983269b92 Signed-off-by: talio --- .../sdc/healing/healers/ForwarderCapabilityHealer.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main') diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ForwarderCapabilityHealer.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ForwarderCapabilityHealer.java index 038a0d889a..c2d7c2c5e4 100644 --- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ForwarderCapabilityHealer.java +++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ForwarderCapabilityHealer.java @@ -28,12 +28,23 @@ public class ForwarderCapabilityHealer implements Healer { private MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); - private final ServiceModelDao serviceModelDao = - ServiceModelDaoFactory.getInstance().createInterface(); + private final ServiceModelDao serviceModelDao; private static ToscaAnalyzerService toscaAnalyzerService = new ToscaAnalyzerServiceImpl(); private static final String FORWARDER_CAPABILITY_ID = "Forwarder"; private static final String UNDERSCORE = "_"; + public ForwarderCapabilityHealer() { + this.serviceModelDao = + ServiceModelDaoFactory.getInstance().createInterface(); + } + + public ForwarderCapabilityHealer(ServiceModelDao + serviceModelDao, + ToscaAnalyzerService toscaAnalyzerService){ + this.serviceModelDao = serviceModelDao; + this.toscaAnalyzerService = toscaAnalyzerService; + } + @Override public Object heal(Map healingParams) throws Exception { String vspId = (String) healingParams.get(SdcCommon.VSP_ID); -- cgit 1.2.3-korg