aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/test/java/org/onap
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-10-12 15:11:07 +0000
committerGerrit Code Review <gerrit@onap.org>2018-10-12 15:11:07 +0000
commitd6c21ac6f38474841d3b9ced0524fe7671ae8682 (patch)
treeac5a12fd0acdc5e0f07fe5089637b7da279e37bc /common/src/test/java/org/onap
parentea7f1ce7584deb1e4896ffcddb8c45e64422a9d0 (diff)
parent6ba0a22bc952232d14d2d24c5f73a42aae2791a9 (diff)
Merge "Dynamic Cloud Owner Support"
Diffstat (limited to 'common/src/test/java/org/onap')
-rw-r--r--common/src/test/java/org/onap/so/serviceinstancebeans/ServiceInstanceBeansTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/common/src/test/java/org/onap/so/serviceinstancebeans/ServiceInstanceBeansTest.java b/common/src/test/java/org/onap/so/serviceinstancebeans/ServiceInstanceBeansTest.java
index 7a4af7808e..5af84fdb86 100644
--- a/common/src/test/java/org/onap/so/serviceinstancebeans/ServiceInstanceBeansTest.java
+++ b/common/src/test/java/org/onap/so/serviceinstancebeans/ServiceInstanceBeansTest.java
@@ -20,10 +20,16 @@
package org.onap.so.serviceinstancebeans;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+
import org.junit.Test;
import org.onap.so.openpojo.rules.HasToStringRule;
import org.onap.so.openpojo.rules.ToStringTester;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
import com.openpojo.reflection.PojoClass;
import com.openpojo.reflection.PojoClassFilter;
import com.openpojo.reflection.filters.FilterEnum;
@@ -43,6 +49,17 @@ public class ServiceInstanceBeansTest {
public void pojoStructure() {
test("org.onap.so.serviceinstancebeans");
}
+
+ @Test
+ public void cloudConfigurationkeepDefaultValues() throws IOException {
+ CloudConfiguration cloudConfiguration = new CloudConfiguration();
+ cloudConfiguration.setLcpCloudRegionId("myRegionId");
+ ObjectMapper mapper = new ObjectMapper();
+
+ assertEquals("{\"cloudOwner\":\"att-aic\",\"lcpCloudRegionId\":\"myRegionId\"}", mapper.writeValueAsString(cloudConfiguration));
+
+
+ }
private void test(String pojoPackage) {
Validator validator = ValidatorBuilder.create()