summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main
diff options
context:
space:
mode:
authorshrikantawachar <shrikant.awachar@amdocs.com>2018-11-20 19:08:06 +0530
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-12-02 08:48:20 +0000
commitc2a1b7c2eea934f309838f0082b2b851012be9a1 (patch)
tree12b3dac98cec264a12d96fe76c727df714ca4601 /openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main
parent594a8c618a763e79e05229509dbf2b60ab831213 (diff)
Enhance or write new tests
Enhance or write new tests Change-Id: I4281b83410645ca0b6f64ab719adcd01c2a04ed3 Issue-ID: SDC-1816 Signed-off-by: shrikantawachar <shrikant.awachar@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main')
-rw-r--r--openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ManufacturerReferenceNumberHealer.java17
-rw-r--r--openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/NetworkPackageHealer.java20
2 files changed, 27 insertions, 10 deletions
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ManufacturerReferenceNumberHealer.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ManufacturerReferenceNumberHealer.java
index 4bb5bc865a..0416cc9479 100644
--- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ManufacturerReferenceNumberHealer.java
+++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ManufacturerReferenceNumberHealer.java
@@ -33,10 +33,19 @@ import java.util.Set;
public class ManufacturerReferenceNumberHealer implements Healer {
private static final String MANUFACTURER_REFERENCE_NUMBER = "MRN";
- private VendorLicenseFacade vendorLicenseFacade = VendorLicenseFacadeFactory.getInstance()
- .createInterface();
- private static final FeatureGroupDao featureGroupDao =
- FeatureGroupDaoFactory.getInstance().createInterface();
+ private final VendorLicenseFacade vendorLicenseFacade;
+ private final FeatureGroupDao featureGroupDao;
+
+ public ManufacturerReferenceNumberHealer() {
+ this(VendorLicenseFacadeFactory.getInstance().createInterface(), FeatureGroupDaoFactory
+ .getInstance().createInterface());
+ }
+
+ public ManufacturerReferenceNumberHealer(VendorLicenseFacade vendorLicenseFacade,
+ FeatureGroupDao featureGroupDao) {
+ this.vendorLicenseFacade = vendorLicenseFacade;
+ this.featureGroupDao = featureGroupDao;
+ }
@Override
public boolean isHealingNeeded(String itemId, Version version) {
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/NetworkPackageHealer.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/NetworkPackageHealer.java
index 5ff90ae1c1..e1807bafad 100644
--- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/NetworkPackageHealer.java
+++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/NetworkPackageHealer.java
@@ -75,14 +75,22 @@ public class NetworkPackageHealer implements Healer {
"Vsp with invalid structure: does not contain element OrchestrationTemplateValidationData"
+ " under OrchestrationTemplate element";
- private VendorSoftwareProductInfoDao vspInfoDao;
- private ZusammenAdaptor zusammenAdaptor;
- private CandidateService candidateService;
+ private final VendorSoftwareProductInfoDao vspInfoDao;
+ private final ZusammenAdaptor zusammenAdaptor;
+ private final CandidateService candidateService;
public NetworkPackageHealer() {
- this.vspInfoDao = VendorSoftwareProductInfoDaoFactory.getInstance().createInterface();
- this.zusammenAdaptor = ZusammenAdaptorFactory.getInstance().createInterface();
- this.candidateService = CandidateServiceFactory.getInstance().createInterface();
+ this(VendorSoftwareProductInfoDaoFactory.getInstance().createInterface(),
+ ZusammenAdaptorFactory.getInstance().createInterface(), CandidateServiceFactory
+ .getInstance().createInterface());
+ }
+
+ public NetworkPackageHealer(VendorSoftwareProductInfoDao vspInfoDao,
+ ZusammenAdaptor zusammenAdaptor,
+ CandidateService candidateService) {
+ this.vspInfoDao = vspInfoDao;
+ this.zusammenAdaptor = zusammenAdaptor;
+ this.candidateService = candidateService;
}
@Override