aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services
diff options
context:
space:
mode:
authorRodrigo Lima <rodrigo.lima@yoppworks.com>2020-05-01 15:25:06 -0400
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-05-06 06:42:14 +0000
commit339d29c714f60de6e4e50b883259fc1a9a16ee84 (patch)
tree429511299e292590bd8613996994dcb6bd8a0919 /openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services
parent57ac9cec55b6470da859330a0fcab70e35422b3c (diff)
Remove powermockito from OrchestrationTemplateCandidateImplTest
- Remove powermockito from OrchestrationTemplateCandidateImplTest. Add new constructor to OrchestrationTemplateCandidateImpl Issue-ID: SDC-3007 Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com> Change-Id: I5f0a2061796e8410a5b225c43baa70d7e0269684
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java27
1 files changed, 21 insertions, 6 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
index e4262df105..c331deb134 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
@@ -72,12 +72,27 @@ import org.springframework.stereotype.Service;
public class OrchestrationTemplateCandidateImpl implements OrchestrationTemplateCandidate {
private static final Logger LOGGER =
LoggerFactory.getLogger(OrchestrationTemplateCandidateImpl.class);
- private OrchestrationTemplateCandidateManager candidateManager =
- OrchestrationTemplateCandidateManagerFactory.getInstance().createInterface();
- private VendorSoftwareProductManager vendorSoftwareProductManager = VspManagerFactory
- .getInstance().createInterface();
- private ActivityLogManager activityLogManager =
- ActivityLogManagerFactory.getInstance().createInterface();
+ private final OrchestrationTemplateCandidateManager candidateManager;
+
+ private final VendorSoftwareProductManager vendorSoftwareProductManager;
+ private final ActivityLogManager activityLogManager;
+
+
+ public OrchestrationTemplateCandidateImpl() {
+ this.candidateManager = OrchestrationTemplateCandidateManagerFactory.getInstance().createInterface();
+ this.vendorSoftwareProductManager = VspManagerFactory.getInstance().createInterface();
+ this.activityLogManager = ActivityLogManagerFactory.getInstance().createInterface();
+ }
+
+ // Constructor used in test to avoid mock static
+ public OrchestrationTemplateCandidateImpl(
+ OrchestrationTemplateCandidateManager candidateManager,
+ VendorSoftwareProductManager vendorSoftwareProductManager,
+ ActivityLogManager activityLogManager) {
+ this.candidateManager = candidateManager;
+ this.vendorSoftwareProductManager = vendorSoftwareProductManager;
+ this.activityLogManager = activityLogManager;
+ }
@Override
public Response upload(final String vspId, final String versionId,