diff options
author | Rob Daugherty <rd472p@att.com> | 2018-10-12 15:11:07 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-10-12 15:11:07 +0000 |
commit | d6c21ac6f38474841d3b9ced0524fe7671ae8682 (patch) | |
tree | ac5a12fd0acdc5e0f07fe5089637b7da279e37bc /common/src/test/java/org/onap | |
parent | ea7f1ce7584deb1e4896ffcddb8c45e64422a9d0 (diff) | |
parent | 6ba0a22bc952232d14d2d24c5f73a42aae2791a9 (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.java | 17 |
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() |