summaryrefslogtreecommitdiffstats
path: root/vid-automation
diff options
context:
space:
mode:
Diffstat (limited to 'vid-automation')
-rw-r--r--vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java
index 8ad111849..2bc664591 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java
@@ -1,12 +1,10 @@
package org.onap.simulator.presetGenerator.presets.BasePresets;
-import vid.automation.test.infra.Features;
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
import java.util.Map;
+import vid.automation.test.infra.Features;
-/**
- * Created by itzikliderman on 27/12/2017.
- */
public abstract class BaseMSOPreset extends BasePreset {
public static final String DEFAULT_CLOUD_OWNER = "irma-aic";
@@ -31,14 +29,14 @@ public abstract class BaseMSOPreset extends BasePreset {
protected String addCloudOwnerIfNeeded() {
return Features.FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST.isActive() ?
- "\"cloudOwner\": \""+cloudOwner+"\"," : "";
+ "\"cloudOwner\": \"" + cloudOwner + "\"," : "";
}
protected String addPlatformIfNeeded(String platform) {
- return platform != "" ?
- " \"platform\": {" +
- " \"platformName\": \""+platform+"\"," +
- "}," : "";
+ return isNotEmpty(platform) ?
+ " \"platform\": {" +
+ " \"platformName\": \"" + platform + "\"," +
+ "}," : "";
}
@Override
@@ -49,7 +47,7 @@ public abstract class BaseMSOPreset extends BasePreset {
@Override
public Map<String, String> getRequestHeaders() {
Map<String, String> map = super.getRequestHeaders();
- map.put("X-ONAP-PartnerName", "VID");
+ map.put("X-ONAP-PartnerName", "VID.VID");
return map;
}
}