From 8c1b7d11033911ca7580a44db2a816e33533389e Mon Sep 17 00:00:00 2001 From: Tomasz Golabek Date: Mon, 26 Aug 2019 12:16:32 +0200 Subject: unit tests - catalog-be Additional junit tests Change-Id: Icc7dd508204094643c4796eaef01febd112a7869 Issue-ID: SDC-2326 Signed-off-by: Tomasz Golabek --- .../sdc/be/components/impl/ActivationRequestInformation.java | 4 ++++ .../openecomp/sdc/be/switchover/detector/SwitchoverDetector.java | 6 ++++++ 2 files changed, 10 insertions(+) (limited to 'catalog-be/src/main') diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ActivationRequestInformation.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ActivationRequestInformation.java index 70ec37ce48..5d98006dec 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ActivationRequestInformation.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ActivationRequestInformation.java @@ -20,6 +20,7 @@ package org.openecomp.sdc.be.components.impl; +import com.google.common.annotations.VisibleForTesting; import org.openecomp.sdc.be.model.Service; /** @@ -30,6 +31,9 @@ public class ActivationRequestInformation { private String workloadContext; private String tenant; + @VisibleForTesting + ActivationRequestInformation() {} + public ActivationRequestInformation(Service serviceToActivate, String workloadContext, String tenant) { this.serviceToActivate = serviceToActivate; this.workloadContext = workloadContext; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetector.java b/catalog-be/src/main/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetector.java index fcca2697c2..9e0c130b21 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetector.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetector.java @@ -20,6 +20,7 @@ package org.openecomp.sdc.be.switchover.detector; +import com.google.common.annotations.VisibleForTesting; import org.apache.commons.codec.binary.Base64; import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; @@ -248,6 +249,11 @@ public class SwitchoverDetector { } + @VisibleForTesting + void setSwitchoverDetectorConfig(SwitchoverDetectorConfig switchoverDetectorConfig) { + this.switchoverDetectorConfig = switchoverDetectorConfig; + } + @PostConstruct private void init() { logger.info("Enter init method of SwitchoverDetector"); -- cgit 1.2.3-korg