summaryrefslogtreecommitdiffstats
path: root/esr-mgr/src/test
diff options
context:
space:
mode:
authorLizi <li.zi30@zte.com.cn>2018-01-11 03:29:08 +0000
committerLizi <li.zi30@zte.com.cn>2018-01-11 03:29:24 +0000
commited26992f976741031237ead3a5dc0565d4318b05 (patch)
treefb88683a32e2dfaf4030febbd9779c749a67c128 /esr-mgr/src/test
parentf73ad41f58f1f60d00d42a8bc5fc2502a46d62dd (diff)
Fix the java code style issue.
Change-Id: Ic4e307ff6bfede6e505b2d758b7f174532b2335b Issue-ID: AAI-622 Signed-off-by: Lizi <li.zi30@zte.com.cn>
Diffstat (limited to 'esr-mgr/src/test')
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/ExtsysAppConfigurationTest.java113
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/ExtsysAppTest.java21
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/common/MsbConfigTest.java4
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionDetailTest.java154
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionListTest.java26
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionTest.java127
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsDetailTest.java58
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsListTest.java22
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsTest.java31
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrSystemInfoListTest.java22
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrSystemInfoTest.java321
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncDetailTest.java90
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncListTest.java22
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncTest.java63
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmDetailTest.java90
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmListTest.java22
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmTest.java63
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/AlarmAddrTest.java63
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/CommonRegisterResponseTest.java15
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/EmsRegisterInfoTest.java117
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/FtpAddrTest.java111
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/ThirdpartySdncRegisterInfoTest.java175
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimAuthInfoTest.java95
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimRegisterInfoTest.java162
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimRegisterResponseTest.java31
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VnfmRegisterInfoTest.java161
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/exception/ExceptionUtilTest.java3
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/exception/ExtsysExceptionTest.java2
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/AaiCommonTest.java2
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/CloudRegionProxyTest.java6
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxyTest.java26
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/externalservice/cloud/VimManagerProxyTest.java2
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/externalservice/msb/MsbHelperTest.java10
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/util/EmsManagerUtilTest.java235
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/util/ExtsysUtilTest.java198
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/util/ThirdpartySdncManagerUtilTest.java123
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/util/VimManagerUtilTest.java167
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/util/VnfmManagerUtilTest.java118
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/wrapper/EmsManagerWrapperTest.java37
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/wrapper/ThirdpartySdncWrapperTest.java221
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/wrapper/VnfmManagerWrapperTest.java207
41 files changed, 1673 insertions, 1863 deletions
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/ExtsysAppConfigurationTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/ExtsysAppConfigurationTest.java
index 95f7fe4..15a4e41 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/ExtsysAppConfigurationTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/ExtsysAppConfigurationTest.java
@@ -16,64 +16,63 @@
package org.onap.aai.esr;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
public class ExtsysAppConfigurationTest {
-
- @Test
- public void getterAndSetter4template(){
- final String template = "Hello ESR";
- ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
- appConfiguration.setTemplate(template);
- assertEquals(appConfiguration.getTemplate(), template);
- }
-
- @Test
- public void getterAndSetter4defaultName(){
- final String defaultName = "ONAP-A&AI-ESR";
- ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
- appConfiguration.setDefaultName(defaultName);
- assertEquals(appConfiguration.getDefaultName(), defaultName);
- }
-
- @Test
- public void getterAndSetter4msbDiscoveryIp(){
- final String msbDiscoveryIp = "127.0.0.1";
- ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
- appConfiguration.setMsbDiscoveryIp(msbDiscoveryIp);
- assertEquals(appConfiguration.getMsbDiscoveryIp(), msbDiscoveryIp);
- }
-
- @Test
- public void getterAndSetter4msbDiscoveryPort(){
- final String msbDiscoveryPort = "10081";
- ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
- appConfiguration.setMsbDiscoveryPort(msbDiscoveryPort);
- assertEquals(appConfiguration.getMsbDiscoveryPort(), msbDiscoveryPort);
- }
-
- @Test
- public void getterAndSetter4registByHand(){
- final String registByHand = "true";
- ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
- appConfiguration.setRegistByHand(registByHand);
- assertEquals(appConfiguration.getRegistByHand(), registByHand);
- }
-
- @Test
- public void getterAndSetter4msbServerAddr(){
- final String msbServerAddr = "http://127.0.0.1:80";
- ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
- appConfiguration.setMsbServerAddr(msbServerAddr);
- assertEquals(appConfiguration.getMsbServerAddr(), msbServerAddr);
- }
-
- @Test
- public void getterAndSetter4serviceIp(){
- final String serviceIp = "true";
- ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
- appConfiguration.setServiceIp(serviceIp);
- assertEquals(appConfiguration.getServiceIp(), serviceIp);
- }
+
+ @Test
+ public void getterAndSetter4template() {
+ final String template = "Hello ESR";
+ ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
+ appConfiguration.setTemplate(template);
+ assertEquals(appConfiguration.getTemplate(), template);
+ }
+
+ @Test
+ public void getterAndSetter4defaultName() {
+ final String defaultName = "ONAP-A&AI-ESR";
+ ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
+ appConfiguration.setDefaultName(defaultName);
+ assertEquals(appConfiguration.getDefaultName(), defaultName);
+ }
+
+ @Test
+ public void getterAndSetter4msbDiscoveryIp() {
+ final String msbDiscoveryIp = "127.0.0.1";
+ ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
+ appConfiguration.setMsbDiscoveryIp(msbDiscoveryIp);
+ assertEquals(appConfiguration.getMsbDiscoveryIp(), msbDiscoveryIp);
+ }
+
+ @Test
+ public void getterAndSetter4msbDiscoveryPort() {
+ final String msbDiscoveryPort = "10081";
+ ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
+ appConfiguration.setMsbDiscoveryPort(msbDiscoveryPort);
+ assertEquals(appConfiguration.getMsbDiscoveryPort(), msbDiscoveryPort);
+ }
+
+ @Test
+ public void getterAndSetter4registByHand() {
+ final String registByHand = "true";
+ ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
+ appConfiguration.setRegistByHand(registByHand);
+ assertEquals(appConfiguration.getRegistByHand(), registByHand);
+ }
+
+ @Test
+ public void getterAndSetter4msbServerAddr() {
+ final String msbServerAddr = "http://127.0.0.1:80";
+ ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
+ appConfiguration.setMsbServerAddr(msbServerAddr);
+ assertEquals(appConfiguration.getMsbServerAddr(), msbServerAddr);
+ }
+
+ @Test
+ public void getterAndSetter4serviceIp() {
+ final String serviceIp = "true";
+ ExtsysAppConfiguration appConfiguration = new ExtsysAppConfiguration();
+ appConfiguration.setServiceIp(serviceIp);
+ assertEquals(appConfiguration.getServiceIp(), serviceIp);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/ExtsysAppTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/ExtsysAppTest.java
index 7f7adb0..ef33f05 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/ExtsysAppTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/ExtsysAppTest.java
@@ -16,19 +16,18 @@
package org.onap.aai.esr;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
import org.onap.aai.esr.common.Config;
public class ExtsysAppTest {
- static {
- ExtsysAppConfiguration configuration = new ExtsysAppConfiguration();
- Config.setConfigration(configuration);
- }
-
- @Test
- public void getName() throws Exception {
- ExtsysApp app = new ExtsysApp();
- assertEquals(app.getName(),"ONAP-ESR");
- }
+ static {
+ ExtsysAppConfiguration configuration = new ExtsysAppConfiguration();
+ Config.setConfigration(configuration);
+ }
+
+ @Test
+ public void getName() throws Exception {
+ ExtsysApp app = new ExtsysApp();
+ assertEquals(app.getName(), "ONAP-ESR");
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/common/MsbConfigTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/common/MsbConfigTest.java
index 5203ee4..b1b7b33 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/common/MsbConfigTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/common/MsbConfigTest.java
@@ -22,7 +22,7 @@ import org.onap.aai.esr.ExtsysAppConfiguration;
public class MsbConfigTest {
@Test
- public void testAllMethods(){
+ public void testAllMethods() {
MsbConfig.setMsbServerAddr("msb-server");
Assert.assertEquals(MsbConfig.getMsbServerAddr(), "msb-server");
@@ -46,7 +46,7 @@ public class MsbConfigTest {
}
@Test
- public void testConfigClass(){
+ public void testConfigClass() {
ExtsysAppConfiguration configur = new ExtsysAppConfiguration();
Config.setConfigration(configur);
Assert.assertEquals(Config.getConfigration(), configur);
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionDetailTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionDetailTest.java
index ac9de8a..82f86e2 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionDetailTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionDetailTest.java
@@ -16,87 +16,85 @@
package org.onap.aai.esr.entity.aai;
import static org.junit.Assert.assertEquals;
-
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
public class CloudRegionDetailTest {
- @Test
- public void getterAndSetter4CloudOwner(){
- final String cloudOwner = "cloud-owner-test";
- CloudRegionDetail cloudRegion = new CloudRegionDetail();
- cloudRegion.setCloudOwner(cloudOwner);
- assertEquals(cloudRegion.getCloudOwner(), cloudOwner);
- }
-
- @Test
- public void getterAndSetter4CloudRegionId(){
- final String cloudRegionId = "cloud-region-id-test";
- CloudRegionDetail cloudRegion = new CloudRegionDetail();
- cloudRegion.setCloudRegionId(cloudRegionId);
- assertEquals(cloudRegion.getCloudRegionId(), cloudRegionId);
- }
-
- @Test
- public void getterAndSetter4CloudType(){
- final String cloudType = "cloud-type-test";
- CloudRegionDetail cloudRegion = new CloudRegionDetail();
- cloudRegion.setCloudType(cloudType);
- assertEquals(cloudRegion.getCloudType(), cloudType);
- }
-
- @Test
- public void getterAndSetter4cloudRegionVersion(){
- final String cloudRegionVersion = "cloud-region-version-test";
- CloudRegionDetail cloudRegion = new CloudRegionDetail();
- cloudRegion.setCloudRegionVersion(cloudRegionVersion);
- assertEquals(cloudRegion.getCloudRegionVersion(), cloudRegionVersion);
- }
-
- @Test
- public void getterAndSetter4ownerDefinedType(){
- final String ownerDefinedType = "owner-defined-type-test";
- CloudRegionDetail cloudRegion = new CloudRegionDetail();
- cloudRegion.setOwnerDefinedType(ownerDefinedType);
- assertEquals(cloudRegion.getOwnerDefinedType(), ownerDefinedType);
- }
-
- @Test
- public void getterAndSetter4cloudZone(){
- final String cloudZone = "cloudZone-test";
- CloudRegionDetail cloudRegion = new CloudRegionDetail();
- cloudRegion.setCloudZone(cloudZone);
- assertEquals(cloudRegion.getCloudZone(), cloudZone);
- }
-
- @Test
- public void getterAndSetter4complexName(){
- final String complexName = "complexName-test";
- CloudRegionDetail cloudRegion = new CloudRegionDetail();
- cloudRegion.setComplexName(complexName);
- assertEquals(cloudRegion.getComplexName(), complexName);
- }
-
- @Test
- public void getterAndSetter4cloudExtraInfo(){
- final String cloudExtraInfo = "cloudExtraInfo-test";
- CloudRegionDetail cloudRegion = new CloudRegionDetail();
- cloudRegion.setCloudExtraInfo(cloudExtraInfo);
- assertEquals(cloudRegion.getCloudExtraInfo(), cloudExtraInfo);
- }
-
- @Test
- public void getterAndSetter4esrSystemInfoList(){
- final EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
- List<EsrSystemInfo> esrSystemInfo = new ArrayList<>();
- EsrSystemInfo esrSystemInfoObj = new EsrSystemInfo();
- esrSystemInfoObj.setEsrSystemInfoId("123");
- esrSystemInfo.add(esrSystemInfoObj );
- esrSystemInfoList.setEsrSystemInfo(esrSystemInfo);
- CloudRegionDetail cloudRegion = new CloudRegionDetail();
- cloudRegion.setEsrSystemInfoList(esrSystemInfoList);
- assertEquals(cloudRegion.getEsrSystemInfoList(), esrSystemInfoList);
- }
+ @Test
+ public void getterAndSetter4CloudOwner() {
+ final String cloudOwner = "cloud-owner-test";
+ CloudRegionDetail cloudRegion = new CloudRegionDetail();
+ cloudRegion.setCloudOwner(cloudOwner);
+ assertEquals(cloudRegion.getCloudOwner(), cloudOwner);
+ }
+
+ @Test
+ public void getterAndSetter4CloudRegionId() {
+ final String cloudRegionId = "cloud-region-id-test";
+ CloudRegionDetail cloudRegion = new CloudRegionDetail();
+ cloudRegion.setCloudRegionId(cloudRegionId);
+ assertEquals(cloudRegion.getCloudRegionId(), cloudRegionId);
+ }
+
+ @Test
+ public void getterAndSetter4CloudType() {
+ final String cloudType = "cloud-type-test";
+ CloudRegionDetail cloudRegion = new CloudRegionDetail();
+ cloudRegion.setCloudType(cloudType);
+ assertEquals(cloudRegion.getCloudType(), cloudType);
+ }
+
+ @Test
+ public void getterAndSetter4cloudRegionVersion() {
+ final String cloudRegionVersion = "cloud-region-version-test";
+ CloudRegionDetail cloudRegion = new CloudRegionDetail();
+ cloudRegion.setCloudRegionVersion(cloudRegionVersion);
+ assertEquals(cloudRegion.getCloudRegionVersion(), cloudRegionVersion);
+ }
+
+ @Test
+ public void getterAndSetter4ownerDefinedType() {
+ final String ownerDefinedType = "owner-defined-type-test";
+ CloudRegionDetail cloudRegion = new CloudRegionDetail();
+ cloudRegion.setOwnerDefinedType(ownerDefinedType);
+ assertEquals(cloudRegion.getOwnerDefinedType(), ownerDefinedType);
+ }
+
+ @Test
+ public void getterAndSetter4cloudZone() {
+ final String cloudZone = "cloudZone-test";
+ CloudRegionDetail cloudRegion = new CloudRegionDetail();
+ cloudRegion.setCloudZone(cloudZone);
+ assertEquals(cloudRegion.getCloudZone(), cloudZone);
+ }
+
+ @Test
+ public void getterAndSetter4complexName() {
+ final String complexName = "complexName-test";
+ CloudRegionDetail cloudRegion = new CloudRegionDetail();
+ cloudRegion.setComplexName(complexName);
+ assertEquals(cloudRegion.getComplexName(), complexName);
+ }
+
+ @Test
+ public void getterAndSetter4cloudExtraInfo() {
+ final String cloudExtraInfo = "cloudExtraInfo-test";
+ CloudRegionDetail cloudRegion = new CloudRegionDetail();
+ cloudRegion.setCloudExtraInfo(cloudExtraInfo);
+ assertEquals(cloudRegion.getCloudExtraInfo(), cloudExtraInfo);
+ }
+
+ @Test
+ public void getterAndSetter4esrSystemInfoList() {
+ final EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
+ List<EsrSystemInfo> esrSystemInfo = new ArrayList<>();
+ EsrSystemInfo esrSystemInfoObj = new EsrSystemInfo();
+ esrSystemInfoObj.setEsrSystemInfoId("123");
+ esrSystemInfo.add(esrSystemInfoObj);
+ esrSystemInfoList.setEsrSystemInfo(esrSystemInfo);
+ CloudRegionDetail cloudRegion = new CloudRegionDetail();
+ cloudRegion.setEsrSystemInfoList(esrSystemInfoList);
+ assertEquals(cloudRegion.getEsrSystemInfoList(), esrSystemInfoList);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionListTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionListTest.java
index 4a3a432..3eb0004 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionListTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionListTest.java
@@ -16,23 +16,21 @@
package org.onap.aai.esr.entity.aai;
import static org.junit.Assert.assertEquals;
-
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
public class CloudRegionListTest {
-
- @Test
- public void getterAndSetter4cloudRegion() {
- CloudRegionList cloudRegionList = new CloudRegionList();
- List<CloudRegion> cloudRegions = new ArrayList<>();
- CloudRegion cloudRegion = new CloudRegion();
- cloudRegion.setCloudOwner("owner");
- cloudRegion.setCloudRegionId("regionId");
- cloudRegions.add(cloudRegion);
- cloudRegionList.setCloudRegion(cloudRegions);
- assertEquals(cloudRegionList.getCloudRegion(), cloudRegions);
- }
+
+ @Test
+ public void getterAndSetter4cloudRegion() {
+ CloudRegionList cloudRegionList = new CloudRegionList();
+ List<CloudRegion> cloudRegions = new ArrayList<>();
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setCloudOwner("owner");
+ cloudRegion.setCloudRegionId("regionId");
+ cloudRegions.add(cloudRegion);
+ cloudRegionList.setCloudRegion(cloudRegions);
+ assertEquals(cloudRegionList.getCloudRegion(), cloudRegions);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionTest.java
index 90af6bc..e731571 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/CloudRegionTest.java
@@ -16,72 +16,71 @@
package org.onap.aai.esr.entity.aai;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
public class CloudRegionTest {
- @Test
- public void getterAndSetter4CloudOwner(){
- final String cloudOwner = "cloud-owner-test";
- CloudRegion cloudRegion = new CloudRegion();
- cloudRegion.setCloudOwner(cloudOwner);
- assertEquals(cloudRegion.getCloudOwner(), cloudOwner);
- }
-
- @Test
- public void getterAndSetter4CloudRegionId(){
- final String cloudRegionId = "cloud-region-id-test";
- CloudRegion cloudRegion = new CloudRegion();
- cloudRegion.setCloudRegionId(cloudRegionId);
- assertEquals(cloudRegion.getCloudRegionId(), cloudRegionId);
- }
-
- @Test
- public void getterAndSetter4CloudType(){
- final String cloudType = "cloud-type-test";
- CloudRegion cloudRegion = new CloudRegion();
- cloudRegion.setCloudType(cloudType);
- assertEquals(cloudRegion.getCloudType(), cloudType);
- }
-
- @Test
- public void getterAndSetter4cloudRegionVersion(){
- final String cloudRegionVersion = "cloud-region-version-test";
- CloudRegion cloudRegion = new CloudRegion();
- cloudRegion.setCloudRegionVersion(cloudRegionVersion);
- assertEquals(cloudRegion.getCloudRegionVersion(), cloudRegionVersion);
- }
-
- @Test
- public void getterAndSetter4ownerDefinedType(){
- final String ownerDefinedType = "owner-defined-type-test";
- CloudRegion cloudRegion = new CloudRegion();
- cloudRegion.setOwnerDefinedType(ownerDefinedType);
- assertEquals(cloudRegion.getOwnerDefinedType(), ownerDefinedType);
- }
-
- @Test
- public void getterAndSetter4cloudZone(){
- final String cloudZone = "cloudZone-test";
- CloudRegion cloudRegion = new CloudRegion();
- cloudRegion.setCloudZone(cloudZone);
- assertEquals(cloudRegion.getCloudZone(), cloudZone);
- }
-
- @Test
- public void getterAndSetter4complexName(){
- final String complexName = "complexName-test";
- CloudRegion cloudRegion = new CloudRegion();
- cloudRegion.setComplexName(complexName);
- assertEquals(cloudRegion.getComplexName(), complexName);
- }
-
- @Test
- public void getterAndSetter4cloudExtraInfo(){
- final String cloudExtraInfo = "cloudExtraInfo-test";
- CloudRegion cloudRegion = new CloudRegion();
- cloudRegion.setCloudExtraInfo(cloudExtraInfo);
- assertEquals(cloudRegion.getCloudExtraInfo(), cloudExtraInfo);
- }
+ @Test
+ public void getterAndSetter4CloudOwner() {
+ final String cloudOwner = "cloud-owner-test";
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setCloudOwner(cloudOwner);
+ assertEquals(cloudRegion.getCloudOwner(), cloudOwner);
+ }
+
+ @Test
+ public void getterAndSetter4CloudRegionId() {
+ final String cloudRegionId = "cloud-region-id-test";
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setCloudRegionId(cloudRegionId);
+ assertEquals(cloudRegion.getCloudRegionId(), cloudRegionId);
+ }
+
+ @Test
+ public void getterAndSetter4CloudType() {
+ final String cloudType = "cloud-type-test";
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setCloudType(cloudType);
+ assertEquals(cloudRegion.getCloudType(), cloudType);
+ }
+
+ @Test
+ public void getterAndSetter4cloudRegionVersion() {
+ final String cloudRegionVersion = "cloud-region-version-test";
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setCloudRegionVersion(cloudRegionVersion);
+ assertEquals(cloudRegion.getCloudRegionVersion(), cloudRegionVersion);
+ }
+
+ @Test
+ public void getterAndSetter4ownerDefinedType() {
+ final String ownerDefinedType = "owner-defined-type-test";
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setOwnerDefinedType(ownerDefinedType);
+ assertEquals(cloudRegion.getOwnerDefinedType(), ownerDefinedType);
+ }
+
+ @Test
+ public void getterAndSetter4cloudZone() {
+ final String cloudZone = "cloudZone-test";
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setCloudZone(cloudZone);
+ assertEquals(cloudRegion.getCloudZone(), cloudZone);
+ }
+
+ @Test
+ public void getterAndSetter4complexName() {
+ final String complexName = "complexName-test";
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setComplexName(complexName);
+ assertEquals(cloudRegion.getComplexName(), complexName);
+ }
+
+ @Test
+ public void getterAndSetter4cloudExtraInfo() {
+ final String cloudExtraInfo = "cloudExtraInfo-test";
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setCloudExtraInfo(cloudExtraInfo);
+ assertEquals(cloudRegion.getCloudExtraInfo(), cloudExtraInfo);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsDetailTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsDetailTest.java
index 7cdbde3..f0af852 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsDetailTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsDetailTest.java
@@ -16,40 +16,38 @@
package org.onap.aai.esr.entity.aai;
import static org.junit.Assert.assertEquals;
-
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
public class EsrEmsDetailTest {
- @Test
- public void getterAndSetter4emsId(){
- final String emsId = "emsId-test";
- EsrEmsDetail esrEmsDetail = new EsrEmsDetail();
- esrEmsDetail.setEmsId(emsId);
- assertEquals(esrEmsDetail.getEmsId(), emsId);
- }
-
- @Test
- public void getterAndSetter4resourceVersion(){
- final String resourceVersion = "resourceVersion-test";
- EsrEmsDetail esrEmsDetail = new EsrEmsDetail();
- esrEmsDetail.setResourceVersion(resourceVersion);
- assertEquals(esrEmsDetail.getResourceVersion(), resourceVersion);
- }
-
- @Test
- public void getterAndSetter4esrSystemInfoList(){
- final EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
- List<EsrSystemInfo> esrSystemInfo = new ArrayList<>();
- EsrSystemInfo esrSystemInfoObj = new EsrSystemInfo();
- esrSystemInfoObj.setEsrSystemInfoId("123");
- esrSystemInfo.add(esrSystemInfoObj );
- esrSystemInfoList.setEsrSystemInfo(esrSystemInfo);
- EsrEmsDetail esrEmsDetail = new EsrEmsDetail();
- esrEmsDetail.setEsrSystemInfoList(esrSystemInfoList);
- assertEquals(esrEmsDetail.getEsrSystemInfoList(), esrSystemInfoList);
- }
+ @Test
+ public void getterAndSetter4emsId() {
+ final String emsId = "emsId-test";
+ EsrEmsDetail esrEmsDetail = new EsrEmsDetail();
+ esrEmsDetail.setEmsId(emsId);
+ assertEquals(esrEmsDetail.getEmsId(), emsId);
+ }
+
+ @Test
+ public void getterAndSetter4resourceVersion() {
+ final String resourceVersion = "resourceVersion-test";
+ EsrEmsDetail esrEmsDetail = new EsrEmsDetail();
+ esrEmsDetail.setResourceVersion(resourceVersion);
+ assertEquals(esrEmsDetail.getResourceVersion(), resourceVersion);
+ }
+
+ @Test
+ public void getterAndSetter4esrSystemInfoList() {
+ final EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
+ List<EsrSystemInfo> esrSystemInfo = new ArrayList<>();
+ EsrSystemInfo esrSystemInfoObj = new EsrSystemInfo();
+ esrSystemInfoObj.setEsrSystemInfoId("123");
+ esrSystemInfo.add(esrSystemInfoObj);
+ esrSystemInfoList.setEsrSystemInfo(esrSystemInfo);
+ EsrEmsDetail esrEmsDetail = new EsrEmsDetail();
+ esrEmsDetail.setEsrSystemInfoList(esrSystemInfoList);
+ assertEquals(esrEmsDetail.getEsrSystemInfoList(), esrSystemInfoList);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsListTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsListTest.java
index 333a900..abf5954 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsListTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsListTest.java
@@ -16,21 +16,19 @@
package org.onap.aai.esr.entity.aai;
import static org.junit.Assert.assertEquals;
-
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
public class EsrEmsListTest {
- @Test
- public void getterAndSetter4EsrEmsList() {
- EsrEmsList esrEmsList = new EsrEmsList();
- List<EsrEms> esrEmses = new ArrayList<>();
- EsrEms esrEms = new EsrEms();
- esrEms.setEmsId("123");
- esrEmses.add(esrEms);
- esrEmsList.setEsrEms(esrEmses);
- assertEquals(esrEmsList.getEsrEms(), esrEmses);
- }
+ @Test
+ public void getterAndSetter4EsrEmsList() {
+ EsrEmsList esrEmsList = new EsrEmsList();
+ List<EsrEms> esrEmses = new ArrayList<>();
+ EsrEms esrEms = new EsrEms();
+ esrEms.setEmsId("123");
+ esrEmses.add(esrEms);
+ esrEmsList.setEsrEms(esrEmses);
+ assertEquals(esrEmsList.getEsrEms(), esrEmses);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsTest.java
index 9776b2e..e2e1100 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsTest.java
@@ -16,23 +16,22 @@
package org.onap.aai.esr.entity.aai;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
public class EsrEmsTest {
- @Test
- public void getterAndSetter4emsId(){
- final String emsId = "emsId-test";
- EsrEms esrEms = new EsrEms();
- esrEms.setEmsId(emsId);
- assertEquals(esrEms.getEmsId(), emsId);
- }
-
- @Test
- public void getterAndSetter4resourceVersion(){
- final String resourceVersion = "resourceVersion-test";
- EsrEms esrEms = new EsrEms();
- esrEms.setResourceVersion(resourceVersion);
- assertEquals(esrEms.getResourceVersion(), resourceVersion);
- }
+ @Test
+ public void getterAndSetter4emsId() {
+ final String emsId = "emsId-test";
+ EsrEms esrEms = new EsrEms();
+ esrEms.setEmsId(emsId);
+ assertEquals(esrEms.getEmsId(), emsId);
+ }
+
+ @Test
+ public void getterAndSetter4resourceVersion() {
+ final String resourceVersion = "resourceVersion-test";
+ EsrEms esrEms = new EsrEms();
+ esrEms.setResourceVersion(resourceVersion);
+ assertEquals(esrEms.getResourceVersion(), resourceVersion);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrSystemInfoListTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrSystemInfoListTest.java
index 6beb4b4..d23ee7b 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrSystemInfoListTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrSystemInfoListTest.java
@@ -16,21 +16,19 @@
package org.onap.aai.esr.entity.aai;
import static org.junit.Assert.assertEquals;
-
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
public class EsrSystemInfoListTest {
- @Test
- public void getterAndSetter4cloudRegion() {
- EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
- List<EsrSystemInfo> esrSystemInfos = new ArrayList<>();
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setEsrSystemInfoId("123");
- esrSystemInfos.add(esrSystemInfo);
- esrSystemInfoList.setEsrSystemInfo(esrSystemInfos);
- assertEquals(esrSystemInfoList.getEsrSystemInfo(), esrSystemInfos);
- }
+ @Test
+ public void getterAndSetter4cloudRegion() {
+ EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
+ List<EsrSystemInfo> esrSystemInfos = new ArrayList<>();
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setEsrSystemInfoId("123");
+ esrSystemInfos.add(esrSystemInfo);
+ esrSystemInfoList.setEsrSystemInfo(esrSystemInfos);
+ assertEquals(esrSystemInfoList.getEsrSystemInfo(), esrSystemInfos);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrSystemInfoTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrSystemInfoTest.java
index bca4ce6..3c90d36 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrSystemInfoTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrSystemInfoTest.java
@@ -16,168 +16,167 @@
package org.onap.aai.esr.entity.aai;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
public class EsrSystemInfoTest {
-
- @Test
- public void getterAndSetter4esrSystemInfoId(){
- final String esrSystemInfoId = "esrSystemInfoId-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setEsrSystemInfoId(esrSystemInfoId);
- assertEquals(esrSystemInfo.getEsrSystemInfoId(), esrSystemInfoId);
- }
-
- @Test
- public void getterAndSetter4systemName(){
- final String systemName = "systemName-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setSystemName(systemName);
- assertEquals(esrSystemInfo.getSystemName(), systemName);
- }
-
- @Test
- public void getterAndSetter4type(){
- final String type = "type-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setType(type);
- assertEquals(esrSystemInfo.getType(), type);
- }
-
- @Test
- public void getterAndSetter4vendor(){
- final String vendor = "vendor-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setVendor(vendor);
- assertEquals(esrSystemInfo.getVendor(), vendor);
- }
-
- @Test
- public void getterAndSetter4version(){
- final String version = "version-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setVersion(version);
- assertEquals(esrSystemInfo.getVersion(), version);
- }
-
- @Test
- public void getterAndSetter4serviceUrl(){
- final String serviceUrl = "serviceUrl-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setServiceUrl(serviceUrl);
- assertEquals(esrSystemInfo.getServiceUrl(), serviceUrl);
- }
-
- @Test
- public void getterAndSetter4userName(){
- final String userName = "userName-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setUserName(userName);
- assertEquals(esrSystemInfo.getUserName(), userName);
- }
-
- @Test
- public void getterAndSetter4password(){
- final String password = "password-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setPassword(password);
- assertEquals(esrSystemInfo.getPassword(), password);
- }
-
- @Test
- public void getterAndSetter4systemType(){
- final String systemType = "systemType-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setSystemType(systemType);
- assertEquals(esrSystemInfo.getSystemType(), systemType);
- }
-
- @Test
- public void getterAndSetter4protocol(){
- final String protocol = "protocol-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setProtocol(protocol);
- assertEquals(esrSystemInfo.getProtocol(), protocol);
- }
-
- @Test
- public void getterAndSetter4sslCassert(){
- final String sslCassert = "sslCassert-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setSslCassert(sslCassert);
- assertEquals(esrSystemInfo.getSslCassert(), sslCassert);
- }
-
- @Test
- public void getterAndSetter4sslInsecure(){
- final Boolean sslInsecure = true;
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setSslInsecure(sslInsecure);
- assertEquals(esrSystemInfo.getSslInsecure(), sslInsecure);
- }
-
- @Test
- public void getterAndSetter4ipAddress(){
- final String ipAddress = "ipAddress-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setIpAddress(ipAddress);
- assertEquals(esrSystemInfo.getIpAddress(), ipAddress);
- }
-
- @Test
- public void getterAndSetter4port(){
- final String port = "port-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setIpAddress(port);
- assertEquals(esrSystemInfo.getIpAddress(), port);
- }
-
- @Test
- public void getterAndSetter4cloudDomain(){
- final String cloudDomain = "cloudDomain-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setCloudDomain(cloudDomain);
- assertEquals(esrSystemInfo.getCloudDomain(), cloudDomain);
- }
-
- @Test
- public void getterAndSetter4defaultTenant(){
- final String defaultTenant = "defaultTenant-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setDefaultTenant(defaultTenant);
- assertEquals(esrSystemInfo.getDefaultTenant(), defaultTenant);
- }
-
- @Test
- public void getterAndSetter4passive(){
- final Boolean passive = true;
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setPassive(passive);
- assertEquals(esrSystemInfo.getPassive(), passive);
- }
-
- @Test
- public void getterAndSetter4remotePath(){
- final String remotePath = "remotePath-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setRemotePath(remotePath);
- assertEquals(esrSystemInfo.getRemotePath(), remotePath);
- }
-
- @Test
- public void getterAndSetter4systemStatus(){
- final String systemStatus = "defaultTenant-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setSystemStatus(systemStatus);
- assertEquals(esrSystemInfo.getSystemStatus(), systemStatus);
- }
-
- @Test
- public void getterAndSetter4resourceVersion(){
- final String resourceVersion = "resourceVersion-test";
- EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setResouceVersion(resourceVersion);
- assertEquals(esrSystemInfo.getResouceVersion(), resourceVersion);
- }
+
+ @Test
+ public void getterAndSetter4esrSystemInfoId() {
+ final String esrSystemInfoId = "esrSystemInfoId-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setEsrSystemInfoId(esrSystemInfoId);
+ assertEquals(esrSystemInfo.getEsrSystemInfoId(), esrSystemInfoId);
+ }
+
+ @Test
+ public void getterAndSetter4systemName() {
+ final String systemName = "systemName-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setSystemName(systemName);
+ assertEquals(esrSystemInfo.getSystemName(), systemName);
+ }
+
+ @Test
+ public void getterAndSetter4type() {
+ final String type = "type-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setType(type);
+ assertEquals(esrSystemInfo.getType(), type);
+ }
+
+ @Test
+ public void getterAndSetter4vendor() {
+ final String vendor = "vendor-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setVendor(vendor);
+ assertEquals(esrSystemInfo.getVendor(), vendor);
+ }
+
+ @Test
+ public void getterAndSetter4version() {
+ final String version = "version-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setVersion(version);
+ assertEquals(esrSystemInfo.getVersion(), version);
+ }
+
+ @Test
+ public void getterAndSetter4serviceUrl() {
+ final String serviceUrl = "serviceUrl-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setServiceUrl(serviceUrl);
+ assertEquals(esrSystemInfo.getServiceUrl(), serviceUrl);
+ }
+
+ @Test
+ public void getterAndSetter4userName() {
+ final String userName = "userName-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setUserName(userName);
+ assertEquals(esrSystemInfo.getUserName(), userName);
+ }
+
+ @Test
+ public void getterAndSetter4password() {
+ final String password = "password-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setPassword(password);
+ assertEquals(esrSystemInfo.getPassword(), password);
+ }
+
+ @Test
+ public void getterAndSetter4systemType() {
+ final String systemType = "systemType-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setSystemType(systemType);
+ assertEquals(esrSystemInfo.getSystemType(), systemType);
+ }
+
+ @Test
+ public void getterAndSetter4protocol() {
+ final String protocol = "protocol-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setProtocol(protocol);
+ assertEquals(esrSystemInfo.getProtocol(), protocol);
+ }
+
+ @Test
+ public void getterAndSetter4sslCassert() {
+ final String sslCassert = "sslCassert-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setSslCassert(sslCassert);
+ assertEquals(esrSystemInfo.getSslCassert(), sslCassert);
+ }
+
+ @Test
+ public void getterAndSetter4sslInsecure() {
+ final Boolean sslInsecure = true;
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setSslInsecure(sslInsecure);
+ assertEquals(esrSystemInfo.getSslInsecure(), sslInsecure);
+ }
+
+ @Test
+ public void getterAndSetter4ipAddress() {
+ final String ipAddress = "ipAddress-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setIpAddress(ipAddress);
+ assertEquals(esrSystemInfo.getIpAddress(), ipAddress);
+ }
+
+ @Test
+ public void getterAndSetter4port() {
+ final String port = "port-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setIpAddress(port);
+ assertEquals(esrSystemInfo.getIpAddress(), port);
+ }
+
+ @Test
+ public void getterAndSetter4cloudDomain() {
+ final String cloudDomain = "cloudDomain-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setCloudDomain(cloudDomain);
+ assertEquals(esrSystemInfo.getCloudDomain(), cloudDomain);
+ }
+
+ @Test
+ public void getterAndSetter4defaultTenant() {
+ final String defaultTenant = "defaultTenant-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setDefaultTenant(defaultTenant);
+ assertEquals(esrSystemInfo.getDefaultTenant(), defaultTenant);
+ }
+
+ @Test
+ public void getterAndSetter4passive() {
+ final Boolean passive = true;
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setPassive(passive);
+ assertEquals(esrSystemInfo.getPassive(), passive);
+ }
+
+ @Test
+ public void getterAndSetter4remotePath() {
+ final String remotePath = "remotePath-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setRemotePath(remotePath);
+ assertEquals(esrSystemInfo.getRemotePath(), remotePath);
+ }
+
+ @Test
+ public void getterAndSetter4systemStatus() {
+ final String systemStatus = "defaultTenant-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setSystemStatus(systemStatus);
+ assertEquals(esrSystemInfo.getSystemStatus(), systemStatus);
+ }
+
+ @Test
+ public void getterAndSetter4resourceVersion() {
+ final String resourceVersion = "resourceVersion-test";
+ EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setResouceVersion(resourceVersion);
+ assertEquals(esrSystemInfo.getResouceVersion(), resourceVersion);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncDetailTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncDetailTest.java
index 7985d55..61fb5e7 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncDetailTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncDetailTest.java
@@ -16,55 +16,53 @@
package org.onap.aai.esr.entity.aai;
import static org.junit.Assert.assertEquals;
-
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
public class EsrThirdpartySdncDetailTest {
- @Test
- public void getterAndSetter4thirdpartySdncId(){
- final String thirdpartySdncId = "thirdpartySdncId-test";
- EsrThirdpartySdncDetail esrThirdpartySdncDetail = new EsrThirdpartySdncDetail();
- esrThirdpartySdncDetail.setThirdpartySdncId(thirdpartySdncId);
- assertEquals(esrThirdpartySdncDetail.getThirdpartySdncId(), thirdpartySdncId);
- }
-
- @Test
- public void getterAndSetter4resourceVersion(){
- final String resourceVersion = "resourceVersion-test";
- EsrThirdpartySdncDetail esrThirdpartySdncDetail = new EsrThirdpartySdncDetail();
- esrThirdpartySdncDetail.setResourceVersion(resourceVersion);
- assertEquals(esrThirdpartySdncDetail.getResourceVersion(), resourceVersion);
- }
-
- @Test
- public void getterAndSetter4location(){
- final String location = "location-test";
- EsrThirdpartySdncDetail esrThirdpartySdncDetail = new EsrThirdpartySdncDetail();
- esrThirdpartySdncDetail.setLocation(location);
- assertEquals(esrThirdpartySdncDetail.getLocation(), location);
- }
-
- @Test
- public void getterAndSetter4productName(){
- final String productName = "productName-test";
- EsrThirdpartySdncDetail esrThirdpartySdncDetail = new EsrThirdpartySdncDetail();
- esrThirdpartySdncDetail.setProductName(productName);
- assertEquals(esrThirdpartySdncDetail.getProductName(), productName);
- }
-
- @Test
- public void getterAndSetter4esrSystemInfoList(){
- final EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
- List<EsrSystemInfo> esrSystemInfo = new ArrayList<>();
- EsrSystemInfo esrSystemInfoObj = new EsrSystemInfo();
- esrSystemInfoObj.setEsrSystemInfoId("123");
- esrSystemInfo.add(esrSystemInfoObj );
- esrSystemInfoList.setEsrSystemInfo(esrSystemInfo);
- EsrThirdpartySdncDetail esrThirdpartySdncDetail = new EsrThirdpartySdncDetail();
- esrThirdpartySdncDetail.setEsrSystemInfoList(esrSystemInfoList);
- assertEquals(esrThirdpartySdncDetail.getEsrSystemInfoList(), esrSystemInfoList);
- }
+ @Test
+ public void getterAndSetter4thirdpartySdncId() {
+ final String thirdpartySdncId = "thirdpartySdncId-test";
+ EsrThirdpartySdncDetail esrThirdpartySdncDetail = new EsrThirdpartySdncDetail();
+ esrThirdpartySdncDetail.setThirdpartySdncId(thirdpartySdncId);
+ assertEquals(esrThirdpartySdncDetail.getThirdpartySdncId(), thirdpartySdncId);
+ }
+
+ @Test
+ public void getterAndSetter4resourceVersion() {
+ final String resourceVersion = "resourceVersion-test";
+ EsrThirdpartySdncDetail esrThirdpartySdncDetail = new EsrThirdpartySdncDetail();
+ esrThirdpartySdncDetail.setResourceVersion(resourceVersion);
+ assertEquals(esrThirdpartySdncDetail.getResourceVersion(), resourceVersion);
+ }
+
+ @Test
+ public void getterAndSetter4location() {
+ final String location = "location-test";
+ EsrThirdpartySdncDetail esrThirdpartySdncDetail = new EsrThirdpartySdncDetail();
+ esrThirdpartySdncDetail.setLocation(location);
+ assertEquals(esrThirdpartySdncDetail.getLocation(), location);
+ }
+
+ @Test
+ public void getterAndSetter4productName() {
+ final String productName = "productName-test";
+ EsrThirdpartySdncDetail esrThirdpartySdncDetail = new EsrThirdpartySdncDetail();
+ esrThirdpartySdncDetail.setProductName(productName);
+ assertEquals(esrThirdpartySdncDetail.getProductName(), productName);
+ }
+
+ @Test
+ public void getterAndSetter4esrSystemInfoList() {
+ final EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
+ List<EsrSystemInfo> esrSystemInfo = new ArrayList<>();
+ EsrSystemInfo esrSystemInfoObj = new EsrSystemInfo();
+ esrSystemInfoObj.setEsrSystemInfoId("123");
+ esrSystemInfo.add(esrSystemInfoObj);
+ esrSystemInfoList.setEsrSystemInfo(esrSystemInfo);
+ EsrThirdpartySdncDetail esrThirdpartySdncDetail = new EsrThirdpartySdncDetail();
+ esrThirdpartySdncDetail.setEsrSystemInfoList(esrSystemInfoList);
+ assertEquals(esrThirdpartySdncDetail.getEsrSystemInfoList(), esrSystemInfoList);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncListTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncListTest.java
index fcf5db4..aed7ab0 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncListTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncListTest.java
@@ -16,21 +16,19 @@
package org.onap.aai.esr.entity.aai;
import static org.junit.Assert.assertEquals;
-
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
public class EsrThirdpartySdncListTest {
- @Test
- public void getterAndSetter4EsrThirdpartySdncList() {
- EsrThirdpartySdncList esrThirdpartySdncList = new EsrThirdpartySdncList();
- List<EsrThirdpartySdnc> esrThirdpartySdncs = new ArrayList<>();
- EsrThirdpartySdnc esrThirdpartySdnc = new EsrThirdpartySdnc();
- esrThirdpartySdnc.setThirdpartySdncId("123");
- esrThirdpartySdncs.add(esrThirdpartySdnc);
- esrThirdpartySdncList.setEsrThirdpartySdnc(esrThirdpartySdncs);
- assertEquals(esrThirdpartySdncList.getEsrThirdpartySdnc(), esrThirdpartySdncs);
- }
+ @Test
+ public void getterAndSetter4EsrThirdpartySdncList() {
+ EsrThirdpartySdncList esrThirdpartySdncList = new EsrThirdpartySdncList();
+ List<EsrThirdpartySdnc> esrThirdpartySdncs = new ArrayList<>();
+ EsrThirdpartySdnc esrThirdpartySdnc = new EsrThirdpartySdnc();
+ esrThirdpartySdnc.setThirdpartySdncId("123");
+ esrThirdpartySdncs.add(esrThirdpartySdnc);
+ esrThirdpartySdncList.setEsrThirdpartySdnc(esrThirdpartySdncs);
+ assertEquals(esrThirdpartySdncList.getEsrThirdpartySdnc(), esrThirdpartySdncs);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncTest.java
index 6f757b5..253dbba 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncTest.java
@@ -16,39 +16,38 @@
package org.onap.aai.esr.entity.aai;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
public class EsrThirdpartySdncTest {
- @Test
- public void getterAndSetter4thirdpartySdncId(){
- final String thirdpartySdncId = "thirdpartySdncId-test";
- EsrThirdpartySdnc esrThirdpartySdnc = new EsrThirdpartySdnc();
- esrThirdpartySdnc.setThirdpartySdncId(thirdpartySdncId);
- assertEquals(esrThirdpartySdnc.getThirdpartySdncId(), thirdpartySdncId);
- }
-
- @Test
- public void getterAndSetter4resourceVersion(){
- final String resourceVersion = "resourceVersion-test";
- EsrThirdpartySdnc esrThirdpartySdnc = new EsrThirdpartySdnc();
- esrThirdpartySdnc.setResourceVersion(resourceVersion);
- assertEquals(esrThirdpartySdnc.getResourceVersion(), resourceVersion);
- }
-
- @Test
- public void getterAndSetter4location(){
- final String location = "location-test";
- EsrThirdpartySdnc esrThirdpartySdnc = new EsrThirdpartySdnc();
- esrThirdpartySdnc.setLocation(location);
- assertEquals(esrThirdpartySdnc.getLocation(), location);
- }
-
- @Test
- public void getterAndSetter4productName(){
- final String productName = "productName-test";
- EsrThirdpartySdnc esrThirdpartySdnc = new EsrThirdpartySdnc();
- esrThirdpartySdnc.setProductName(productName);
- assertEquals(esrThirdpartySdnc.getProductName(), productName);
- }
+ @Test
+ public void getterAndSetter4thirdpartySdncId() {
+ final String thirdpartySdncId = "thirdpartySdncId-test";
+ EsrThirdpartySdnc esrThirdpartySdnc = new EsrThirdpartySdnc();
+ esrThirdpartySdnc.setThirdpartySdncId(thirdpartySdncId);
+ assertEquals(esrThirdpartySdnc.getThirdpartySdncId(), thirdpartySdncId);
+ }
+
+ @Test
+ public void getterAndSetter4resourceVersion() {
+ final String resourceVersion = "resourceVersion-test";
+ EsrThirdpartySdnc esrThirdpartySdnc = new EsrThirdpartySdnc();
+ esrThirdpartySdnc.setResourceVersion(resourceVersion);
+ assertEquals(esrThirdpartySdnc.getResourceVersion(), resourceVersion);
+ }
+
+ @Test
+ public void getterAndSetter4location() {
+ final String location = "location-test";
+ EsrThirdpartySdnc esrThirdpartySdnc = new EsrThirdpartySdnc();
+ esrThirdpartySdnc.setLocation(location);
+ assertEquals(esrThirdpartySdnc.getLocation(), location);
+ }
+
+ @Test
+ public void getterAndSetter4productName() {
+ final String productName = "productName-test";
+ EsrThirdpartySdnc esrThirdpartySdnc = new EsrThirdpartySdnc();
+ esrThirdpartySdnc.setProductName(productName);
+ assertEquals(esrThirdpartySdnc.getProductName(), productName);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmDetailTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmDetailTest.java
index 17991aa..fa85f5a 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmDetailTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmDetailTest.java
@@ -16,55 +16,53 @@
package org.onap.aai.esr.entity.aai;
import static org.junit.Assert.assertEquals;
-
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
public class EsrVnfmDetailTest {
- @Test
- public void getterAndSetter4vnfmId(){
- final String vnfmId = "vnfmId-test";
- EsrVnfmDetail esrVnfm = new EsrVnfmDetail();
- esrVnfm.setVnfmId(vnfmId);
- assertEquals(esrVnfm.getVnfmId(), vnfmId);
- }
-
- @Test
- public void getterAndSetter4resourceVersion(){
- final String resourceVersion = "resourceVersion-test";
- EsrVnfmDetail esrVnfm = new EsrVnfmDetail();
- esrVnfm.setResourceVersion(resourceVersion);
- assertEquals(esrVnfm.getResourceVersion(), resourceVersion);
- }
-
- @Test
- public void getterAndSetter4vimId(){
- final String vimId = "vimId-test";
- EsrVnfmDetail esrVnfm = new EsrVnfmDetail();
- esrVnfm.setVimId(vimId);
- assertEquals(esrVnfm.getVimId(), vimId);
- }
-
- @Test
- public void getterAndSetter4certificateUrl(){
- final String certificateUrl = "certificateUrl-test";
- EsrVnfmDetail esrVnfm = new EsrVnfmDetail();
- esrVnfm.setCertificateUrl(certificateUrl);
- assertEquals(esrVnfm.getCertificateUrl(), certificateUrl);
- }
-
- @Test
- public void getterAndSetter4esrSystemInfoList(){
- final EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
- List<EsrSystemInfo> esrSystemInfo = new ArrayList<>();
- EsrSystemInfo esrSystemInfoObj = new EsrSystemInfo();
- esrSystemInfoObj.setEsrSystemInfoId("123");
- esrSystemInfo.add(esrSystemInfoObj );
- esrSystemInfoList.setEsrSystemInfo(esrSystemInfo);
- EsrVnfmDetail esrVnfmDetail = new EsrVnfmDetail();
- esrVnfmDetail.setEsrSystemInfoList(esrSystemInfoList);
- assertEquals(esrVnfmDetail.getEsrSystemInfoList(), esrSystemInfoList);
- }
+ @Test
+ public void getterAndSetter4vnfmId() {
+ final String vnfmId = "vnfmId-test";
+ EsrVnfmDetail esrVnfm = new EsrVnfmDetail();
+ esrVnfm.setVnfmId(vnfmId);
+ assertEquals(esrVnfm.getVnfmId(), vnfmId);
+ }
+
+ @Test
+ public void getterAndSetter4resourceVersion() {
+ final String resourceVersion = "resourceVersion-test";
+ EsrVnfmDetail esrVnfm = new EsrVnfmDetail();
+ esrVnfm.setResourceVersion(resourceVersion);
+ assertEquals(esrVnfm.getResourceVersion(), resourceVersion);
+ }
+
+ @Test
+ public void getterAndSetter4vimId() {
+ final String vimId = "vimId-test";
+ EsrVnfmDetail esrVnfm = new EsrVnfmDetail();
+ esrVnfm.setVimId(vimId);
+ assertEquals(esrVnfm.getVimId(), vimId);
+ }
+
+ @Test
+ public void getterAndSetter4certificateUrl() {
+ final String certificateUrl = "certificateUrl-test";
+ EsrVnfmDetail esrVnfm = new EsrVnfmDetail();
+ esrVnfm.setCertificateUrl(certificateUrl);
+ assertEquals(esrVnfm.getCertificateUrl(), certificateUrl);
+ }
+
+ @Test
+ public void getterAndSetter4esrSystemInfoList() {
+ final EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
+ List<EsrSystemInfo> esrSystemInfo = new ArrayList<>();
+ EsrSystemInfo esrSystemInfoObj = new EsrSystemInfo();
+ esrSystemInfoObj.setEsrSystemInfoId("123");
+ esrSystemInfo.add(esrSystemInfoObj);
+ esrSystemInfoList.setEsrSystemInfo(esrSystemInfo);
+ EsrVnfmDetail esrVnfmDetail = new EsrVnfmDetail();
+ esrVnfmDetail.setEsrSystemInfoList(esrSystemInfoList);
+ assertEquals(esrVnfmDetail.getEsrSystemInfoList(), esrSystemInfoList);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmListTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmListTest.java
index 943307b..0c57470 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmListTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmListTest.java
@@ -16,21 +16,19 @@
package org.onap.aai.esr.entity.aai;
import static org.junit.Assert.assertEquals;
-
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
public class EsrVnfmListTest {
- @Test
- public void getterAndSetter4EsrVnfmList() {
- EsrVnfmList esrVnfmList = new EsrVnfmList();
- List<EsrVnfm> esrVnfms = new ArrayList<>();
- EsrVnfm esrVnfm = new EsrVnfm();
- esrVnfm.setVnfmId("fadasf");
- esrVnfms.add(esrVnfm);
- esrVnfmList.setEsrVnfm(esrVnfms);
- assertEquals(esrVnfmList.getEsrVnfm(), esrVnfms);
- }
+ @Test
+ public void getterAndSetter4EsrVnfmList() {
+ EsrVnfmList esrVnfmList = new EsrVnfmList();
+ List<EsrVnfm> esrVnfms = new ArrayList<>();
+ EsrVnfm esrVnfm = new EsrVnfm();
+ esrVnfm.setVnfmId("fadasf");
+ esrVnfms.add(esrVnfm);
+ esrVnfmList.setEsrVnfm(esrVnfms);
+ assertEquals(esrVnfmList.getEsrVnfm(), esrVnfms);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmTest.java
index efdf61d..f0f5ebf 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmTest.java
@@ -16,39 +16,38 @@
package org.onap.aai.esr.entity.aai;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
public class EsrVnfmTest {
- @Test
- public void getterAndSetter4vnfmId(){
- final String vnfmId = "vnfmId-test";
- EsrVnfm esrVnfm = new EsrVnfm();
- esrVnfm.setVnfmId(vnfmId);
- assertEquals(esrVnfm.getVnfmId(), vnfmId);
- }
-
- @Test
- public void getterAndSetter4resourceVersion(){
- final String resourceVersion = "resourceVersion-test";
- EsrVnfm esrVnfm = new EsrVnfm();
- esrVnfm.setResourceVersion(resourceVersion);
- assertEquals(esrVnfm.getResourceVersion(), resourceVersion);
- }
-
- @Test
- public void getterAndSetter4vimId(){
- final String vimId = "vimId-test";
- EsrVnfm esrVnfm = new EsrVnfm();
- esrVnfm.setVimId(vimId);
- assertEquals(esrVnfm.getVimId(), vimId);
- }
-
- @Test
- public void getterAndSetter4certificateUrl(){
- final String certificateUrl = "certificateUrl-test";
- EsrVnfm esrVnfm = new EsrVnfm();
- esrVnfm.setCertificateUrl(certificateUrl);
- assertEquals(esrVnfm.getCertificateUrl(), certificateUrl);
- }
+ @Test
+ public void getterAndSetter4vnfmId() {
+ final String vnfmId = "vnfmId-test";
+ EsrVnfm esrVnfm = new EsrVnfm();
+ esrVnfm.setVnfmId(vnfmId);
+ assertEquals(esrVnfm.getVnfmId(), vnfmId);
+ }
+
+ @Test
+ public void getterAndSetter4resourceVersion() {
+ final String resourceVersion = "resourceVersion-test";
+ EsrVnfm esrVnfm = new EsrVnfm();
+ esrVnfm.setResourceVersion(resourceVersion);
+ assertEquals(esrVnfm.getResourceVersion(), resourceVersion);
+ }
+
+ @Test
+ public void getterAndSetter4vimId() {
+ final String vimId = "vimId-test";
+ EsrVnfm esrVnfm = new EsrVnfm();
+ esrVnfm.setVimId(vimId);
+ assertEquals(esrVnfm.getVimId(), vimId);
+ }
+
+ @Test
+ public void getterAndSetter4certificateUrl() {
+ final String certificateUrl = "certificateUrl-test";
+ EsrVnfm esrVnfm = new EsrVnfm();
+ esrVnfm.setCertificateUrl(certificateUrl);
+ assertEquals(esrVnfm.getCertificateUrl(), certificateUrl);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/AlarmAddrTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/AlarmAddrTest.java
index ddab31b..b460aa1 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/AlarmAddrTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/AlarmAddrTest.java
@@ -16,40 +16,39 @@
package org.onap.aai.esr.entity.rest;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
public class AlarmAddrTest {
- @Test
- public void getterAndSetter4ip(){
- final String ip = "127.0.0.1";
- AlarmAddr alarmAddr = new AlarmAddr();
- alarmAddr.setIp(ip);
- assertEquals(alarmAddr.getIp(), ip);
- }
-
- @Test
- public void getterAndSetter4port(){
- final String port = "8080";
- AlarmAddr alarmAddr = new AlarmAddr();
- alarmAddr.setPort(port);
- assertEquals(alarmAddr.getPort(), port);
- }
-
- @Test
- public void getterAndSetter4user(){
- final String user = "root";
- AlarmAddr alarmAddr = new AlarmAddr();
- alarmAddr.setUser(user);
- assertEquals(alarmAddr.getUser(), user);
- }
-
- @Test
- public void getterAndSetter4password(){
- final String password = "dfasfa";
- AlarmAddr alarmAddr = new AlarmAddr();
- alarmAddr.setPassword(password);
- assertEquals(alarmAddr.getPassword(), password);
- }
+ @Test
+ public void getterAndSetter4ip() {
+ final String ip = "127.0.0.1";
+ AlarmAddr alarmAddr = new AlarmAddr();
+ alarmAddr.setIp(ip);
+ assertEquals(alarmAddr.getIp(), ip);
+ }
+
+ @Test
+ public void getterAndSetter4port() {
+ final String port = "8080";
+ AlarmAddr alarmAddr = new AlarmAddr();
+ alarmAddr.setPort(port);
+ assertEquals(alarmAddr.getPort(), port);
+ }
+
+ @Test
+ public void getterAndSetter4user() {
+ final String user = "root";
+ AlarmAddr alarmAddr = new AlarmAddr();
+ alarmAddr.setUser(user);
+ assertEquals(alarmAddr.getUser(), user);
+ }
+
+ @Test
+ public void getterAndSetter4password() {
+ final String password = "dfasfa";
+ AlarmAddr alarmAddr = new AlarmAddr();
+ alarmAddr.setPassword(password);
+ assertEquals(alarmAddr.getPassword(), password);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/CommonRegisterResponseTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/CommonRegisterResponseTest.java
index 9f4aa20..7912b1b 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/CommonRegisterResponseTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/CommonRegisterResponseTest.java
@@ -16,15 +16,14 @@
package org.onap.aai.esr.entity.rest;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
public class CommonRegisterResponseTest {
- @Test
- public void getterAndSetter4id(){
- final String id = "312erqdfa";
- CommonRegisterResponse commonRegisterResponse = new CommonRegisterResponse();
- commonRegisterResponse.setId(id);
- assertEquals(commonRegisterResponse.getId(), id);
- }
+ @Test
+ public void getterAndSetter4id() {
+ final String id = "312erqdfa";
+ CommonRegisterResponse commonRegisterResponse = new CommonRegisterResponse();
+ commonRegisterResponse.setId(id);
+ assertEquals(commonRegisterResponse.getId(), id);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/EmsRegisterInfoTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/EmsRegisterInfoTest.java
index 091604b..d9a77df 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/EmsRegisterInfoTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/EmsRegisterInfoTest.java
@@ -16,66 +16,65 @@
package org.onap.aai.esr.entity.rest;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
public class EmsRegisterInfoTest {
- @Test
- public void getterAndSetter4emsId(){
- final String emsId = "dafadf";
- EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
- emsRegisterInfo.setEmsId(emsId);
- assertEquals(emsRegisterInfo.getEmsId(), emsId);
- }
-
- @Test
- public void getterAndSetter4name() {
- final String name = "dafadf";
- EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
- emsRegisterInfo.setName(name);
- assertEquals(emsRegisterInfo.getName(), name);
- }
-
- @Test
- public void getterAndSetter4vendor(){
- final String vendor = "dafadf";
- EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
- emsRegisterInfo.setVendor(vendor);
- assertEquals(emsRegisterInfo.getVendor(), vendor);
- }
-
- @Test
- public void getterAndSetter4version(){
- final String version = "dafadf";
- EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
- emsRegisterInfo.setVersion(version);
- assertEquals(emsRegisterInfo.getVersion(), version);
- }
-
- @Test
- public void getterAndSetter4resouceAddr(){
- EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
- final FtpAddr resourceAddr = new FtpAddr();
- resourceAddr.setFtptype("sftp");
- emsRegisterInfo.setResourceAddr(resourceAddr);
- assertEquals(emsRegisterInfo.getResourceAddr(), resourceAddr);
- }
-
- @Test
- public void getterAndSetter4performanceAddr(){
- EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
- final FtpAddr performanceAddr = new FtpAddr();
- performanceAddr.setFtptype("sftp");
- emsRegisterInfo.setPerformanceAddr(performanceAddr);
- assertEquals(emsRegisterInfo.getPerformanceAddr(), performanceAddr);
- }
-
- @Test
- public void getterAndSetter4alarmAddr(){
- EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
- final AlarmAddr alarmAddr = new AlarmAddr();
- alarmAddr.setIp("127.0.0.1");
- emsRegisterInfo.setAlarmAddr(alarmAddr);
- assertEquals(emsRegisterInfo.getAlarmAddr(), alarmAddr);
- }
+ @Test
+ public void getterAndSetter4emsId() {
+ final String emsId = "dafadf";
+ EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
+ emsRegisterInfo.setEmsId(emsId);
+ assertEquals(emsRegisterInfo.getEmsId(), emsId);
+ }
+
+ @Test
+ public void getterAndSetter4name() {
+ final String name = "dafadf";
+ EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
+ emsRegisterInfo.setName(name);
+ assertEquals(emsRegisterInfo.getName(), name);
+ }
+
+ @Test
+ public void getterAndSetter4vendor() {
+ final String vendor = "dafadf";
+ EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
+ emsRegisterInfo.setVendor(vendor);
+ assertEquals(emsRegisterInfo.getVendor(), vendor);
+ }
+
+ @Test
+ public void getterAndSetter4version() {
+ final String version = "dafadf";
+ EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
+ emsRegisterInfo.setVersion(version);
+ assertEquals(emsRegisterInfo.getVersion(), version);
+ }
+
+ @Test
+ public void getterAndSetter4resouceAddr() {
+ EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
+ final FtpAddr resourceAddr = new FtpAddr();
+ resourceAddr.setFtptype("sftp");
+ emsRegisterInfo.setResourceAddr(resourceAddr);
+ assertEquals(emsRegisterInfo.getResourceAddr(), resourceAddr);
+ }
+
+ @Test
+ public void getterAndSetter4performanceAddr() {
+ EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
+ final FtpAddr performanceAddr = new FtpAddr();
+ performanceAddr.setFtptype("sftp");
+ emsRegisterInfo.setPerformanceAddr(performanceAddr);
+ assertEquals(emsRegisterInfo.getPerformanceAddr(), performanceAddr);
+ }
+
+ @Test
+ public void getterAndSetter4alarmAddr() {
+ EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
+ final AlarmAddr alarmAddr = new AlarmAddr();
+ alarmAddr.setIp("127.0.0.1");
+ emsRegisterInfo.setAlarmAddr(alarmAddr);
+ assertEquals(emsRegisterInfo.getAlarmAddr(), alarmAddr);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/FtpAddrTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/FtpAddrTest.java
index 13883bb..b823688 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/FtpAddrTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/FtpAddrTest.java
@@ -16,64 +16,63 @@
package org.onap.aai.esr.entity.rest;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
public class FtpAddrTest {
- @Test
- public void getterAndSetter4ip(){
- final String ip = "127.0.0.1";
- FtpAddr ftpAddr = new FtpAddr();
- ftpAddr.setIp(ip);
- assertEquals(ftpAddr.getIp(), ip);
- }
-
- @Test
- public void getterAndSetter4port(){
- final String port = "8080";
- FtpAddr ftpAddr = new FtpAddr();
- ftpAddr.setPort(port);
- assertEquals(ftpAddr.getPort(), port);
- }
-
- @Test
- public void getterAndSetter4user(){
- final String user = "root";
- FtpAddr ftpAddr = new FtpAddr();
- ftpAddr.setUser(user);
- assertEquals(ftpAddr.getUser(), user);
- }
-
- @Test
- public void getterAndSetter4password(){
- final String password = "dfasfa";
- FtpAddr ftpAddr = new FtpAddr();
- ftpAddr.setPassword(password);
- assertEquals(ftpAddr.getPassword(), password);
- }
-
- @Test
- public void getterAndSetter4ftptype(){
- final String ftptype = "sftp";
- FtpAddr ftpAddr = new FtpAddr();
- ftpAddr.setFtptype(ftptype);
- assertEquals(ftpAddr.getFtptype(), ftptype);
- }
-
- @Test
- public void getterAndSetter4remotepath(){
- final String remotepath = "/home/opt/";
- FtpAddr ftpAddr = new FtpAddr();
- ftpAddr.setRemotepath(remotepath);
- assertEquals(ftpAddr.getRemotepath(), remotepath);
- }
-
- @Test
- public void getterAndSetter4passive(){
- final Boolean passive = true;
- FtpAddr ftpAddr = new FtpAddr();
- ftpAddr.setPassive(passive);
- assertEquals(ftpAddr.getPassive(), passive);
- }
+ @Test
+ public void getterAndSetter4ip() {
+ final String ip = "127.0.0.1";
+ FtpAddr ftpAddr = new FtpAddr();
+ ftpAddr.setIp(ip);
+ assertEquals(ftpAddr.getIp(), ip);
+ }
+
+ @Test
+ public void getterAndSetter4port() {
+ final String port = "8080";
+ FtpAddr ftpAddr = new FtpAddr();
+ ftpAddr.setPort(port);
+ assertEquals(ftpAddr.getPort(), port);
+ }
+
+ @Test
+ public void getterAndSetter4user() {
+ final String user = "root";
+ FtpAddr ftpAddr = new FtpAddr();
+ ftpAddr.setUser(user);
+ assertEquals(ftpAddr.getUser(), user);
+ }
+
+ @Test
+ public void getterAndSetter4password() {
+ final String password = "dfasfa";
+ FtpAddr ftpAddr = new FtpAddr();
+ ftpAddr.setPassword(password);
+ assertEquals(ftpAddr.getPassword(), password);
+ }
+
+ @Test
+ public void getterAndSetter4ftptype() {
+ final String ftptype = "sftp";
+ FtpAddr ftpAddr = new FtpAddr();
+ ftpAddr.setFtptype(ftptype);
+ assertEquals(ftpAddr.getFtptype(), ftptype);
+ }
+
+ @Test
+ public void getterAndSetter4remotepath() {
+ final String remotepath = "/home/opt/";
+ FtpAddr ftpAddr = new FtpAddr();
+ ftpAddr.setRemotepath(remotepath);
+ assertEquals(ftpAddr.getRemotepath(), remotepath);
+ }
+
+ @Test
+ public void getterAndSetter4passive() {
+ final Boolean passive = true;
+ FtpAddr ftpAddr = new FtpAddr();
+ ftpAddr.setPassive(passive);
+ assertEquals(ftpAddr.getPassive(), passive);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/ThirdpartySdncRegisterInfoTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/ThirdpartySdncRegisterInfoTest.java
index 86524c5..4cd9355 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/ThirdpartySdncRegisterInfoTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/ThirdpartySdncRegisterInfoTest.java
@@ -16,95 +16,94 @@
package org.onap.aai.esr.entity.rest;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
public class ThirdpartySdncRegisterInfoTest {
- @Test
- public void getterAndSetter4cloudDomain(){
- final String thirdpartySdncId = "312erqdfa";
- ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- thirdpartySdncRegisterInfo.setThirdpartySdncId(thirdpartySdncId);
- assertEquals(thirdpartySdncRegisterInfo.getThirdpartySdncId(), thirdpartySdncId);
- }
-
- @Test
- public void getterAndSetter4name(){
- final String name = "sdnc-test";
- ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- thirdpartySdncRegisterInfo.setName(name);
- assertEquals(thirdpartySdncRegisterInfo.getName(), name);
- }
-
- @Test
- public void getterAndSetter4vendor(){
- final String vendor = "zte";
- ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- thirdpartySdncRegisterInfo.setVendor(vendor);
- assertEquals(thirdpartySdncRegisterInfo.getVendor(), vendor);
- }
-
- @Test
- public void getterAndSetter4version(){
- final String version = "v1.0";
- ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- thirdpartySdncRegisterInfo.setVersion(version);
- assertEquals(thirdpartySdncRegisterInfo.getVersion(), version);
- }
-
- @Test
- public void getterAndSetter4type(){
- final String type = "type-test";
- ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- thirdpartySdncRegisterInfo.setType(type);
- assertEquals(thirdpartySdncRegisterInfo.getType(), type);
- }
-
- @Test
- public void getterAndSetter4location(){
- final String location = "312erqdfa";
- ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- thirdpartySdncRegisterInfo.setLocation(location);
- assertEquals(thirdpartySdncRegisterInfo.getLocation(), location);
- }
-
- @Test
- public void getterAndSetter4url(){
- final String url = "http://13.44.22.11:5000";
- ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- thirdpartySdncRegisterInfo.setUrl(url);
- assertEquals(thirdpartySdncRegisterInfo.getUrl(), url);
- }
-
- @Test
- public void getterAndSetter4userName(){
- final String userName = "root";
- ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- thirdpartySdncRegisterInfo.setUserName(userName);
- assertEquals(thirdpartySdncRegisterInfo.getUserName(), userName);
- }
-
- @Test
- public void getterAndSetter4password(){
- final String password = "root";
- ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- thirdpartySdncRegisterInfo.setPassword(password);
- assertEquals(thirdpartySdncRegisterInfo.getPassword(), password);
- }
-
- @Test
- public void getterAndSetter4productName(){
- final String productName = "sdnctest";
- ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- thirdpartySdncRegisterInfo.setProductName(productName);
- assertEquals(thirdpartySdncRegisterInfo.getProductName(), productName);
- }
-
- @Test
- public void getterAndSetter4protocol(){
- final String protocol = "root";
- ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- thirdpartySdncRegisterInfo.setProtocol(protocol);
- assertEquals(thirdpartySdncRegisterInfo.getProtocol(), protocol);
- }
+ @Test
+ public void getterAndSetter4cloudDomain() {
+ final String thirdpartySdncId = "312erqdfa";
+ ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ thirdpartySdncRegisterInfo.setThirdpartySdncId(thirdpartySdncId);
+ assertEquals(thirdpartySdncRegisterInfo.getThirdpartySdncId(), thirdpartySdncId);
+ }
+
+ @Test
+ public void getterAndSetter4name() {
+ final String name = "sdnc-test";
+ ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ thirdpartySdncRegisterInfo.setName(name);
+ assertEquals(thirdpartySdncRegisterInfo.getName(), name);
+ }
+
+ @Test
+ public void getterAndSetter4vendor() {
+ final String vendor = "zte";
+ ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ thirdpartySdncRegisterInfo.setVendor(vendor);
+ assertEquals(thirdpartySdncRegisterInfo.getVendor(), vendor);
+ }
+
+ @Test
+ public void getterAndSetter4version() {
+ final String version = "v1.0";
+ ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ thirdpartySdncRegisterInfo.setVersion(version);
+ assertEquals(thirdpartySdncRegisterInfo.getVersion(), version);
+ }
+
+ @Test
+ public void getterAndSetter4type() {
+ final String type = "type-test";
+ ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ thirdpartySdncRegisterInfo.setType(type);
+ assertEquals(thirdpartySdncRegisterInfo.getType(), type);
+ }
+
+ @Test
+ public void getterAndSetter4location() {
+ final String location = "312erqdfa";
+ ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ thirdpartySdncRegisterInfo.setLocation(location);
+ assertEquals(thirdpartySdncRegisterInfo.getLocation(), location);
+ }
+
+ @Test
+ public void getterAndSetter4url() {
+ final String url = "http://13.44.22.11:5000";
+ ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ thirdpartySdncRegisterInfo.setUrl(url);
+ assertEquals(thirdpartySdncRegisterInfo.getUrl(), url);
+ }
+
+ @Test
+ public void getterAndSetter4userName() {
+ final String userName = "root";
+ ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ thirdpartySdncRegisterInfo.setUserName(userName);
+ assertEquals(thirdpartySdncRegisterInfo.getUserName(), userName);
+ }
+
+ @Test
+ public void getterAndSetter4password() {
+ final String password = "root";
+ ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ thirdpartySdncRegisterInfo.setPassword(password);
+ assertEquals(thirdpartySdncRegisterInfo.getPassword(), password);
+ }
+
+ @Test
+ public void getterAndSetter4productName() {
+ final String productName = "sdnctest";
+ ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ thirdpartySdncRegisterInfo.setProductName(productName);
+ assertEquals(thirdpartySdncRegisterInfo.getProductName(), productName);
+ }
+
+ @Test
+ public void getterAndSetter4protocol() {
+ final String protocol = "root";
+ ThirdpartySdncRegisterInfo thirdpartySdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ thirdpartySdncRegisterInfo.setProtocol(protocol);
+ assertEquals(thirdpartySdncRegisterInfo.getProtocol(), protocol);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimAuthInfoTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimAuthInfoTest.java
index 5e8aa4f..94875fc 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimAuthInfoTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimAuthInfoTest.java
@@ -16,56 +16,55 @@
package org.onap.aai.esr.entity.rest;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
public class VimAuthInfoTest {
- @Test
- public void getterAndSetter4cloudDomain(){
- final String cloudDomain = "chengdu";
- VimAuthInfo vimAuthInfo = new VimAuthInfo();
- vimAuthInfo.setCloudDomain(cloudDomain);
- assertEquals(vimAuthInfo.getCloudDomain(), cloudDomain);
- }
-
- @Test
- public void getterAndSetter4userName(){
- final String userName = "nancy";
- VimAuthInfo vimAuthInfo = new VimAuthInfo();
- vimAuthInfo.setUserName(userName);
- assertEquals(vimAuthInfo.getUserName(), userName);
- }
-
- @Test
- public void getterAndSetter4password(){
- final String password = "dasffa";
- VimAuthInfo vimAuthInfo = new VimAuthInfo();
- vimAuthInfo.setPassword(password);
- assertEquals(vimAuthInfo.getPassword(), password);
- }
-
- @Test
- public void getterAndSetter4authUrl(){
- final String authUrl = "http://127.0.0.1:5000/auth/";
- VimAuthInfo vimAuthInfo = new VimAuthInfo();
- vimAuthInfo.setAuthUrl(authUrl);
- assertEquals(vimAuthInfo.getAuthUrl(), authUrl);
- }
-
- @Test
- public void getterAndSetter4sslCacert(){
- final String sslCacert = "fdfafda";
- VimAuthInfo vimAuthInfo = new VimAuthInfo();
- vimAuthInfo.setSslCacert(sslCacert);
- assertEquals(vimAuthInfo.getSslCacert(), sslCacert);
- }
-
- @Test
- public void getterAndSetter4sslInsecure(){
- final Boolean sslInsecure = true;
- VimAuthInfo vimAuthInfo = new VimAuthInfo();
- vimAuthInfo.setSslInsecure(sslInsecure);
- assertEquals(vimAuthInfo.getSslInsecure(), sslInsecure);
- }
+ @Test
+ public void getterAndSetter4cloudDomain() {
+ final String cloudDomain = "chengdu";
+ VimAuthInfo vimAuthInfo = new VimAuthInfo();
+ vimAuthInfo.setCloudDomain(cloudDomain);
+ assertEquals(vimAuthInfo.getCloudDomain(), cloudDomain);
+ }
+
+ @Test
+ public void getterAndSetter4userName() {
+ final String userName = "nancy";
+ VimAuthInfo vimAuthInfo = new VimAuthInfo();
+ vimAuthInfo.setUserName(userName);
+ assertEquals(vimAuthInfo.getUserName(), userName);
+ }
+
+ @Test
+ public void getterAndSetter4password() {
+ final String password = "dasffa";
+ VimAuthInfo vimAuthInfo = new VimAuthInfo();
+ vimAuthInfo.setPassword(password);
+ assertEquals(vimAuthInfo.getPassword(), password);
+ }
+
+ @Test
+ public void getterAndSetter4authUrl() {
+ final String authUrl = "http://127.0.0.1:5000/auth/";
+ VimAuthInfo vimAuthInfo = new VimAuthInfo();
+ vimAuthInfo.setAuthUrl(authUrl);
+ assertEquals(vimAuthInfo.getAuthUrl(), authUrl);
+ }
+
+ @Test
+ public void getterAndSetter4sslCacert() {
+ final String sslCacert = "fdfafda";
+ VimAuthInfo vimAuthInfo = new VimAuthInfo();
+ vimAuthInfo.setSslCacert(sslCacert);
+ assertEquals(vimAuthInfo.getSslCacert(), sslCacert);
+ }
+
+ @Test
+ public void getterAndSetter4sslInsecure() {
+ final Boolean sslInsecure = true;
+ VimAuthInfo vimAuthInfo = new VimAuthInfo();
+ vimAuthInfo.setSslInsecure(sslInsecure);
+ assertEquals(vimAuthInfo.getSslInsecure(), sslInsecure);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimRegisterInfoTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimRegisterInfoTest.java
index 4f4c989..74761f9 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimRegisterInfoTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimRegisterInfoTest.java
@@ -16,91 +16,89 @@
package org.onap.aai.esr.entity.rest;
import static org.junit.Assert.assertEquals;
-
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
public class VimRegisterInfoTest {
- @Test
- public void getterAndSetter4cloudOwner(){
- final String cloudOwner = "zte";
- VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
- vimRegisterInfo.setCloudOwner(cloudOwner);
- assertEquals(vimRegisterInfo.getCloudOwner(), cloudOwner);
- }
-
- @Test
- public void getterAndSetter4cloudRegionId(){
- final String cloudRegionId = "region-one";
- VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
- vimRegisterInfo.setCloudRegionId(cloudRegionId);
- assertEquals(vimRegisterInfo.getCloudRegionId(), cloudRegionId);
- }
-
- @Test
- public void getterAndSetter4cloudType(){
- final String cloudType = "openstack";
- VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
- vimRegisterInfo.setCloudType(cloudType);
- assertEquals(vimRegisterInfo.getCloudType(), cloudType);
- }
-
- @Test
- public void getterAndSetter4cloudRegionVersion(){
- final String cloudRegionVersion = "v1.0";
- VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
- vimRegisterInfo.setCloudRegionVersion(cloudRegionVersion);
- assertEquals(vimRegisterInfo.getCloudRegionVersion(), cloudRegionVersion);
- }
-
- @Test
- public void getterAndSetter4ownerDefinedType(){
- final String ownerDefinedType = "test";
- VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
- vimRegisterInfo.setOwnerDefinedType(ownerDefinedType);
- assertEquals(vimRegisterInfo.getOwnerDefinedType(), ownerDefinedType);
- }
-
- @Test
- public void getterAndSetter4cloudZone(){
- final String cloudZone = "zone1";
- VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
- vimRegisterInfo.setCloudZone(cloudZone);
- assertEquals(vimRegisterInfo.getCloudZone(), cloudZone);
- }
-
- @Test
- public void getterAndSetter4complexName(){
- final String complexName = "test";
- VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
- vimRegisterInfo.setComplexName(complexName);
- assertEquals(vimRegisterInfo.getComplexName(), complexName);
- }
-
- @Test
- public void getterAndSetter4cloudExtraInfo(){
- final String cloudExtraInfo = "test";
- VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
- vimRegisterInfo.setCloudExtraInfo(cloudExtraInfo);
- assertEquals(vimRegisterInfo.getCloudExtraInfo(), cloudExtraInfo);
- }
-
- @Test
- public void getterAndSetter4status(){
- final String status = "normal";
- VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
- vimRegisterInfo.setStatus(status);
- assertEquals(vimRegisterInfo.getStatus(), status);
- }
-
- @Test
- public void getterAndSetter4vimAuthInfos(){
- final List<VimAuthInfo> vimAuthInfos = new ArrayList<>();
- VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
- vimRegisterInfo.setVimAuthInfos(vimAuthInfos);
- assertEquals(vimRegisterInfo.getVimAuthInfos(), vimAuthInfos);
- }
-
+ @Test
+ public void getterAndSetter4cloudOwner() {
+ final String cloudOwner = "zte";
+ VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
+ vimRegisterInfo.setCloudOwner(cloudOwner);
+ assertEquals(vimRegisterInfo.getCloudOwner(), cloudOwner);
+ }
+
+ @Test
+ public void getterAndSetter4cloudRegionId() {
+ final String cloudRegionId = "region-one";
+ VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
+ vimRegisterInfo.setCloudRegionId(cloudRegionId);
+ assertEquals(vimRegisterInfo.getCloudRegionId(), cloudRegionId);
+ }
+
+ @Test
+ public void getterAndSetter4cloudType() {
+ final String cloudType = "openstack";
+ VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
+ vimRegisterInfo.setCloudType(cloudType);
+ assertEquals(vimRegisterInfo.getCloudType(), cloudType);
+ }
+
+ @Test
+ public void getterAndSetter4cloudRegionVersion() {
+ final String cloudRegionVersion = "v1.0";
+ VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
+ vimRegisterInfo.setCloudRegionVersion(cloudRegionVersion);
+ assertEquals(vimRegisterInfo.getCloudRegionVersion(), cloudRegionVersion);
+ }
+
+ @Test
+ public void getterAndSetter4ownerDefinedType() {
+ final String ownerDefinedType = "test";
+ VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
+ vimRegisterInfo.setOwnerDefinedType(ownerDefinedType);
+ assertEquals(vimRegisterInfo.getOwnerDefinedType(), ownerDefinedType);
+ }
+
+ @Test
+ public void getterAndSetter4cloudZone() {
+ final String cloudZone = "zone1";
+ VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
+ vimRegisterInfo.setCloudZone(cloudZone);
+ assertEquals(vimRegisterInfo.getCloudZone(), cloudZone);
+ }
+
+ @Test
+ public void getterAndSetter4complexName() {
+ final String complexName = "test";
+ VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
+ vimRegisterInfo.setComplexName(complexName);
+ assertEquals(vimRegisterInfo.getComplexName(), complexName);
+ }
+
+ @Test
+ public void getterAndSetter4cloudExtraInfo() {
+ final String cloudExtraInfo = "test";
+ VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
+ vimRegisterInfo.setCloudExtraInfo(cloudExtraInfo);
+ assertEquals(vimRegisterInfo.getCloudExtraInfo(), cloudExtraInfo);
+ }
+
+ @Test
+ public void getterAndSetter4status() {
+ final String status = "normal";
+ VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
+ vimRegisterInfo.setStatus(status);
+ assertEquals(vimRegisterInfo.getStatus(), status);
+ }
+
+ @Test
+ public void getterAndSetter4vimAuthInfos() {
+ final List<VimAuthInfo> vimAuthInfos = new ArrayList<>();
+ VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
+ vimRegisterInfo.setVimAuthInfos(vimAuthInfos);
+ assertEquals(vimRegisterInfo.getVimAuthInfos(), vimAuthInfos);
+ }
+
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimRegisterResponseTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimRegisterResponseTest.java
index 21ebd16..bd555a2 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimRegisterResponseTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimRegisterResponseTest.java
@@ -16,24 +16,23 @@
package org.onap.aai.esr.entity.rest;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
public class VimRegisterResponseTest {
- @Test
- public void getterAndSetter4cloudOwner(){
- final String cloudOwner = "zte";
- VimRegisterResponse vimRegisterResponse = new VimRegisterResponse();
- vimRegisterResponse.setCloudOwner(cloudOwner);
- assertEquals(vimRegisterResponse.getCloudOwner(), cloudOwner);
- }
-
- @Test
- public void getterAndSetter4cloudRegionId(){
- final String cloudRegionId = "region-one";
- VimRegisterResponse vimRegisterResponse = new VimRegisterResponse();
- vimRegisterResponse.setCloudRegionId(cloudRegionId);
- assertEquals(vimRegisterResponse.getCloudRegionId(), cloudRegionId);
- }
+ @Test
+ public void getterAndSetter4cloudOwner() {
+ final String cloudOwner = "zte";
+ VimRegisterResponse vimRegisterResponse = new VimRegisterResponse();
+ vimRegisterResponse.setCloudOwner(cloudOwner);
+ assertEquals(vimRegisterResponse.getCloudOwner(), cloudOwner);
+ }
+
+ @Test
+ public void getterAndSetter4cloudRegionId() {
+ final String cloudRegionId = "region-one";
+ VimRegisterResponse vimRegisterResponse = new VimRegisterResponse();
+ vimRegisterResponse.setCloudRegionId(cloudRegionId);
+ assertEquals(vimRegisterResponse.getCloudRegionId(), cloudRegionId);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VnfmRegisterInfoTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VnfmRegisterInfoTest.java
index 84d171d..b57525c 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VnfmRegisterInfoTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VnfmRegisterInfoTest.java
@@ -16,88 +16,87 @@
package org.onap.aai.esr.entity.rest;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
public class VnfmRegisterInfoTest {
-
- @Test
- public void getterAndSetter4vnfmId(){
- final String vnfmId = "dafadf";
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- vnfmRegisterInfo.setVnfmId(vnfmId);
- assertEquals(vnfmRegisterInfo.getVnfmId(), vnfmId);
- }
-
- @Test
- public void getterAndSetter4name(){
- final String name = "name-test";
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- vnfmRegisterInfo.setName(name);
- assertEquals(vnfmRegisterInfo.getName(), name);
- }
-
- @Test
- public void getterAndSetter4type(){
- final String type = "vnfm-type";
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- vnfmRegisterInfo.setType(type);
- assertEquals(vnfmRegisterInfo.getType(), type);
- }
-
- @Test
- public void getterAndSetter4vimId(){
- final String vimId = "dafadf";
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- vnfmRegisterInfo.setVimId(vimId);
- assertEquals(vnfmRegisterInfo.getVimId(), vimId);
- }
-
- @Test
- public void getterAndSetter4vendor(){
- final String vendor = "zte";
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- vnfmRegisterInfo.setVendor(vendor);
- assertEquals(vnfmRegisterInfo.getVendor(), vendor);
- }
-
- @Test
- public void getterAndSetter4version(){
- final String version = "v1.0";
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- vnfmRegisterInfo.setVersion(version);
- assertEquals(vnfmRegisterInfo.getVersion(), version);
- }
-
- @Test
- public void getterAndSetter4certificateUrl(){
- final String certificateUrl = "/test";
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- vnfmRegisterInfo.setCertificateUrl(certificateUrl);
- assertEquals(vnfmRegisterInfo.getCertificateUrl(), certificateUrl);
- }
-
- @Test
- public void getterAndSetter4url(){
- final String url = "/home";
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- vnfmRegisterInfo.setUrl(url);
- assertEquals(vnfmRegisterInfo.getUrl(), url);
- }
-
- @Test
- public void getterAndSetter4userName(){
- final String userName = "li";
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- vnfmRegisterInfo.setUserName(userName);
- assertEquals(vnfmRegisterInfo.getUserName(), userName);
- }
-
- @Test
- public void getterAndSetter4password(){
- final String password = "dfaaf";
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- vnfmRegisterInfo.setPassword(password);
- assertEquals(vnfmRegisterInfo.getPassword(), password);
- }
+
+ @Test
+ public void getterAndSetter4vnfmId() {
+ final String vnfmId = "dafadf";
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ vnfmRegisterInfo.setVnfmId(vnfmId);
+ assertEquals(vnfmRegisterInfo.getVnfmId(), vnfmId);
+ }
+
+ @Test
+ public void getterAndSetter4name() {
+ final String name = "name-test";
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ vnfmRegisterInfo.setName(name);
+ assertEquals(vnfmRegisterInfo.getName(), name);
+ }
+
+ @Test
+ public void getterAndSetter4type() {
+ final String type = "vnfm-type";
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ vnfmRegisterInfo.setType(type);
+ assertEquals(vnfmRegisterInfo.getType(), type);
+ }
+
+ @Test
+ public void getterAndSetter4vimId() {
+ final String vimId = "dafadf";
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ vnfmRegisterInfo.setVimId(vimId);
+ assertEquals(vnfmRegisterInfo.getVimId(), vimId);
+ }
+
+ @Test
+ public void getterAndSetter4vendor() {
+ final String vendor = "zte";
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ vnfmRegisterInfo.setVendor(vendor);
+ assertEquals(vnfmRegisterInfo.getVendor(), vendor);
+ }
+
+ @Test
+ public void getterAndSetter4version() {
+ final String version = "v1.0";
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ vnfmRegisterInfo.setVersion(version);
+ assertEquals(vnfmRegisterInfo.getVersion(), version);
+ }
+
+ @Test
+ public void getterAndSetter4certificateUrl() {
+ final String certificateUrl = "/test";
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ vnfmRegisterInfo.setCertificateUrl(certificateUrl);
+ assertEquals(vnfmRegisterInfo.getCertificateUrl(), certificateUrl);
+ }
+
+ @Test
+ public void getterAndSetter4url() {
+ final String url = "/home";
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ vnfmRegisterInfo.setUrl(url);
+ assertEquals(vnfmRegisterInfo.getUrl(), url);
+ }
+
+ @Test
+ public void getterAndSetter4userName() {
+ final String userName = "li";
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ vnfmRegisterInfo.setUserName(userName);
+ assertEquals(vnfmRegisterInfo.getUserName(), userName);
+ }
+
+ @Test
+ public void getterAndSetter4password() {
+ final String password = "dfaaf";
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ vnfmRegisterInfo.setPassword(password);
+ assertEquals(vnfmRegisterInfo.getPassword(), password);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/exception/ExceptionUtilTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/exception/ExceptionUtilTest.java
index 38f8fa2..df4d46b 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/exception/ExceptionUtilTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/exception/ExceptionUtilTest.java
@@ -17,13 +17,12 @@ package org.onap.aai.esr.exception;
import org.junit.Assert;
import org.junit.Test;
-
import javax.ws.rs.WebApplicationException;
public class ExceptionUtilTest {
@Test
- public void testBuildExceptionResponse(){
+ public void testBuildExceptionResponse() {
WebApplicationException exp = ExceptionUtil.buildExceptionResponse("Exception from JUnit");
Assert.assertNotNull(exp);
Assert.assertNotNull(exp.getResponse());
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/exception/ExtsysExceptionTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/exception/ExtsysExceptionTest.java
index e448f50..e3ae403 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/exception/ExtsysExceptionTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/exception/ExtsysExceptionTest.java
@@ -21,7 +21,7 @@ import org.junit.Test;
public class ExtsysExceptionTest {
@Test
- public void testAllMethods(){
+ public void testAllMethods() {
ExtsysException esExp = new ExtsysException();
esExp.setErrorCode("498");
Assert.assertEquals(esExp.getErrorCode(), "498");
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/AaiCommonTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/AaiCommonTest.java
index 1940c79..b428cc4 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/AaiCommonTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/AaiCommonTest.java
@@ -21,7 +21,7 @@ import org.junit.Test;
public class AaiCommonTest {
@Test
- public void testGetAuthenticationCredentials(){
+ public void testGetAuthenticationCredentials() {
String cred = AaiCommon.getAuthenticationCredentials();
Assert.assertNotNull(cred);
Assert.assertTrue(cred.contains("Basic"));
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/CloudRegionProxyTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/CloudRegionProxyTest.java
index 22c9524..b6e4de1 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/CloudRegionProxyTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/CloudRegionProxyTest.java
@@ -26,7 +26,7 @@ public class CloudRegionProxyTest {
CloudRegionProxy proxy;
@Before
- public void init(){
+ public void init() {
MsbConfig.setMsbServerAddr("http://msb-server");
proxy = new CloudRegionProxy();
}
@@ -43,12 +43,12 @@ public class CloudRegionProxyTest {
}
@Test(expected = ExtsysException.class)
- public void testQueryVimList() throws ExtsysException{
+ public void testQueryVimList() throws ExtsysException {
proxy.qureyVimList();
}
@Test(expected = ExtsysException.class)
- public void testDeleteVim() throws ExtsysException{
+ public void testDeleteVim() throws ExtsysException {
proxy.deleteVim("owner-1", "region-1", "version-1");
}
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxyTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxyTest.java
index 8f7cc92..09e6318 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxyTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxyTest.java
@@ -34,65 +34,65 @@ public class ExternalSystemProxyTest {
}
@Test(expected = ExtsysException.class)
- public void testRegisterVnfm() throws ExtsysException{
+ public void testRegisterVnfm() throws ExtsysException {
EsrVnfmDetail detail = new EsrVnfmDetail();
ExternalSystemProxy.registerVnfm("vnfm-1", detail);
}
@Test(expected = ExtsysException.class)
- public void testQueryVnfmDetail() throws ExtsysException{
+ public void testQueryVnfmDetail() throws ExtsysException {
ExternalSystemProxy.queryVnfmDetail("vnfm-1");
}
@Test(expected = ExtsysException.class)
- public void testQueryVnfmList() throws ExtsysException{
+ public void testQueryVnfmList() throws ExtsysException {
ExternalSystemProxy.queryVnfmList();
}
@Test(expected = ExtsysException.class)
- public void testDeleteVnfm() throws ExtsysException{
+ public void testDeleteVnfm() throws ExtsysException {
ExternalSystemProxy.deleteVnfm("vnfm-1", "version-1");
}
@Test(expected = ExtsysException.class)
- public void testRegisterSdnc() throws ExtsysException{
+ public void testRegisterSdnc() throws ExtsysException {
EsrThirdpartySdncDetail detail = new EsrThirdpartySdncDetail();
ExternalSystemProxy.registerSdnc("sdnc-1", detail);
}
@Test(expected = ExtsysException.class)
- public void testQueryThirdpartySdncDetail() throws ExtsysException{
+ public void testQueryThirdpartySdncDetail() throws ExtsysException {
ExternalSystemProxy.queryThirdpartySdncDetail("sdnc-1");
}
@Test(expected = ExtsysException.class)
- public void testQuerySdncList() throws ExtsysException{
+ public void testQuerySdncList() throws ExtsysException {
ExternalSystemProxy.querySdncList();
}
@Test(expected = ExtsysException.class)
- public void testDeleteThirdpartySdnc() throws ExtsysException{
+ public void testDeleteThirdpartySdnc() throws ExtsysException {
ExternalSystemProxy.deleteThirdpartySdnc("sdnc-1", "version-1");
}
@Test(expected = ExtsysException.class)
- public void testRegisterEms() throws ExtsysException{
+ public void testRegisterEms() throws ExtsysException {
EsrEmsDetail detail = new EsrEmsDetail();
- ExternalSystemProxy.registerEms("ems-1",detail);
+ ExternalSystemProxy.registerEms("ems-1", detail);
}
@Test(expected = ExtsysException.class)
- public void testQueryEmsDetail() throws ExtsysException{
+ public void testQueryEmsDetail() throws ExtsysException {
ExternalSystemProxy.queryEmsDetail("ems-1");
}
@Test(expected = ExtsysException.class)
- public void testQueryEmsList() throws ExtsysException{
+ public void testQueryEmsList() throws ExtsysException {
ExternalSystemProxy.queryEmsList();
}
@Test(expected = ExtsysException.class)
- public void testDeleteEms() throws ExtsysException{
+ public void testDeleteEms() throws ExtsysException {
ExternalSystemProxy.deleteEms("ems-1", "version-1");
}
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/cloud/VimManagerProxyTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/cloud/VimManagerProxyTest.java
index 5637783..044d830 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/cloud/VimManagerProxyTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/cloud/VimManagerProxyTest.java
@@ -32,7 +32,7 @@ public class VimManagerProxyTest {
}
@Test(expected = ExtsysException.class)
- public void testUpdateVim() throws ExtsysException{
+ public void testUpdateVim() throws ExtsysException {
Tenant tenant = new Tenant();
tenant.setDefaultTenant("defaultTenant");
Assert.assertEquals(tenant.getDefaultTenant(), "defaultTenant");
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/msb/MsbHelperTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/msb/MsbHelperTest.java
index 28a22c5..1581b08 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/msb/MsbHelperTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/msb/MsbHelperTest.java
@@ -35,17 +35,17 @@ public class MsbHelperTest {
MicroServiceFullInfo serviceInfo;
@Before
- public void init(){
+ public void init() {
MockitoAnnotations.initMocks(this);
helper = new MsbHelper(client);
}
@Test
public void testRegisterMsb() throws Exception {
- Mockito.when(client.registerMicroServiceInfo(Mockito.any(MicroServiceInfo.class),
- Mockito.anyBoolean())).thenReturn(serviceInfo);
+ Mockito.when(client.registerMicroServiceInfo(Mockito.any(MicroServiceInfo.class), Mockito.anyBoolean()))
+ .thenReturn(serviceInfo);
helper.registerMsb();
- Mockito.verify(client, Mockito.times(1)).
- registerMicroServiceInfo(Mockito.any(MicroServiceInfo.class), Mockito.anyBoolean());
+ Mockito.verify(client, Mockito.times(1)).registerMicroServiceInfo(Mockito.any(MicroServiceInfo.class),
+ Mockito.anyBoolean());
}
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/util/EmsManagerUtilTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/util/EmsManagerUtilTest.java
index ba16be7..76d4d31 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/util/EmsManagerUtilTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/util/EmsManagerUtilTest.java
@@ -16,164 +16,95 @@
package org.onap.aai.esr.util;
import static org.junit.Assert.assertEquals;
-
-
import org.junit.Test;
import org.onap.aai.esr.entity.aai.EsrEmsDetail;
import org.onap.aai.esr.entity.rest.AlarmAddr;
import org.onap.aai.esr.entity.rest.EmsRegisterInfo;
import org.onap.aai.esr.entity.rest.FtpAddr;
-
import com.google.gson.Gson;
public class EmsManagerUtilTest {
-
- @Test
- public void getEsrSystemInfoListFromAuthInfoTest() {
- EmsManagerUtil emsManagerUtil = new EmsManagerUtil();
- EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
- EsrEmsDetail esrEms = new EsrEmsDetail();
- AlarmAddr alarmAddr = new AlarmAddr();
- FtpAddr resourceAddr = new FtpAddr();
- FtpAddr performanceAddr = new FtpAddr();
- alarmAddr.setIp("127.0.0.1");
- alarmAddr.setPassword("987654");
- alarmAddr.setPort("5000");
- alarmAddr.setUser("nancy");
- resourceAddr.setFtptype("sftp");
- resourceAddr.setIp("127.0.0.1");
- resourceAddr.setPassive(true);
- resourceAddr.setPassword("asdf");
- resourceAddr.setPort("5000");
- resourceAddr.setRemotepath("/home/per");
- resourceAddr.setUser("nancy");
- performanceAddr.setFtptype("sftp");
- performanceAddr.setIp("127.0.0.1");
- performanceAddr.setPassive(true);
- performanceAddr.setPassword("asdf");
- performanceAddr.setPort("5000");
- performanceAddr.setRemotepath("/home/per");
- performanceAddr.setUser("nancy");
- emsRegisterInfo.setName("EMS_TEST");
- emsRegisterInfo.setVendor("ZTE");
- emsRegisterInfo.setVersion("V1");
- emsRegisterInfo.setAlarmAddr(alarmAddr);
- emsRegisterInfo.setResourceAddr(resourceAddr);
- emsRegisterInfo.setPerformanceAddr(performanceAddr);
- esrEms = emsManagerUtil.emsRegisterInfo2EsrEms(emsRegisterInfo);
- esrEms.setEmsId("123456");
- esrEms.getEsrSystemInfoList().getEsrSystemInfo().get(0).setEsrSystemInfoId("234567");
- esrEms.getEsrSystemInfoList().getEsrSystemInfo().get(1).setEsrSystemInfoId("345678");
- esrEms.getEsrSystemInfoList().getEsrSystemInfo().get(2).setEsrSystemInfoId("456789");
- String esremsStr = new ExtsysUtil().objectToString(esrEms);
- String expect = "{\"ems-id\":\"123456\","
- + "\"esr-system-info-list\":"
- + "{\"esr-system-info\":"
- + "[{\"esr-system-info-id\":\"234567\","
- + "\"system-name\":\"EMS_TEST\","
- + "\"type\":\"sftp\","
- + "\"vendor\":\"ZTE\","
- + "\"version\":\"V1\","
- + "\"user-name\":\"nancy\","
- + "\"password\":\"asdf\","
- + "\"system-type\":\"EMS_RESOUCE\","
- + "\"ip-address\":\"127.0.0.1\","
- + "\"port\":\"5000\","
- + "\"passive\":true,"
- + "\"remote-path\":\"/home/per\"},"
- + "{\"esr-system-info-id\":\"345678\","
- + "\"system-name\":\"EMS_TEST\","
- + "\"type\":\"sftp\","
- + "\"vendor\":\"ZTE\","
- + "\"version\":\"V1\","
- + "\"user-name\":\"nancy\","
- + "\"password\":\"asdf\","
- + "\"system-type\":\"EMS_PERFORMANCE\","
- + "\"ip-address\":\"127.0.0.1\","
- + "\"port\":\"5000\","
- + "\"passive\":true,"
- + "\"remote-path\":\"/home/per\"},"
- + "{\"esr-system-info-id\":\"456789\","
- + "\"system-name\":\"EMS_TEST\","
- + "\"vendor\":\"ZTE\","
- + "\"version\":\"V1\","
- + "\"user-name\":\"nancy\","
- + "\"password\":\"987654\","
- + "\"system-type\":\"EMS_ALARM\","
- + "\"ip-address\":\"127.0.0.1\","
- + "\"port\":\"5000\"}]}}";
- assertEquals(expect, esremsStr);
- }
-
- @Test
- public void EsrEms2EmsRegisterInfoTest() {
- EsrEmsDetail esrEms = new EsrEmsDetail();
- EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
- EmsManagerUtil emsManagerUtil = new EmsManagerUtil();
- String esrEmsStr = "{\"ems-id\":\"123456\","
- + "\"esr-system-info-list\":"
- + "{\"esr-system-info\":"
- + "[{\"esr-system-info-id\":\"234567\","
- + "\"system-name\":\"EMS_TEST\","
- + "\"type\":\"sftp\","
- + "\"vendor\":\"ZTE\","
- + "\"version\":\"V1\","
- + "\"user-name\":\"nancy\","
- + "\"password\":\"asdf\","
- + "\"system-type\":\"EMS_RESOUCE\","
- + "\"ip-address\":\"127.0.0.1\","
- + "\"port\":\"5000\","
- + "\"passive\":true,"
- + "\"remote-path\":\"/home/per\"},"
- + "{\"esr-system-info-id\":\"345678\","
- + "\"system-name\":\"EMS_TEST\","
- + "\"type\":\"sftp\","
- + "\"vendor\":\"ZTE\","
- + "\"version\":\"V1\","
- + "\"user-name\":\"nancy\","
- + "\"password\":\"asdf\","
- + "\"system-type\":\"EMS_PERFORMANCE\","
- + "\"ip-address\":\"127.0.0.1\","
- + "\"port\":\"5000\","
- + "\"passive\":true,"
- + "\"remote-path\":\"/home/per\"},"
- + "{\"esr-system-info-id\":\"456789\","
- + "\"system-name\":\"EMS_TEST\","
- + "\"vendor\":\"ZTE\","
- + "\"version\":\"V1\","
- + "\"user-name\":\"nancy\","
- + "\"password\":\"987654\","
- + "\"system-type\":\"EMS_ALARM\","
- + "\"ip-address\":\"127.0.0.1\","
- + "\"port\":\"5000\"}]}}";
- esrEms = new Gson().fromJson(esrEmsStr, EsrEmsDetail.class);
- emsRegisterInfo = emsManagerUtil.EsrEms2EmsRegisterInfo(esrEms);
- String registerInfoStr = new ExtsysUtil().objectToString(emsRegisterInfo);
- String expectRegisterInfo = "{\"emsId\":\"123456\","
- + "\"name\":\"EMS_TEST\","
- + "\"vendor\":\"ZTE\","
- + "\"version\":\"V1\","
- + "\"resourceAddr\":{"
- + "\"ftptype\":\"sftp\","
- + "\"ip\":\"127.0.0.1\","
- + "\"port\":\"5000\","
- + "\"user\":\"nancy\","
- + "\"password\":\"asdf\","
- + "\"remotepath\":\"/home/per\","
- + "\"passive\":true},"
- + "\"performanceAddr\":{"
- + "\"ftptype\":\"sftp\","
- + "\"ip\":\"127.0.0.1\","
- + "\"port\":\"5000\","
- + "\"user\":\"nancy\","
- + "\"password\":\"asdf\","
- + "\"remotepath\":\"/home/per\","
- + "\"passive\":true},"
- + "\"alarmAddr\":{"
- + "\"ip\":\"127.0.0.1\","
- + "\"port\":\"5000\","
- + "\"user\":\"nancy\","
- + "\"password\":\"987654\"}}";
- assertEquals(registerInfoStr, expectRegisterInfo);
- }
+
+ @Test
+ public void getEsrSystemInfoListFromAuthInfoTest() {
+ EmsManagerUtil emsManagerUtil = new EmsManagerUtil();
+ EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
+ EsrEmsDetail esrEms = new EsrEmsDetail();
+ AlarmAddr alarmAddr = new AlarmAddr();
+ FtpAddr resourceAddr = new FtpAddr();
+ FtpAddr performanceAddr = new FtpAddr();
+ alarmAddr.setIp("127.0.0.1");
+ alarmAddr.setPassword("987654");
+ alarmAddr.setPort("5000");
+ alarmAddr.setUser("nancy");
+ resourceAddr.setFtptype("sftp");
+ resourceAddr.setIp("127.0.0.1");
+ resourceAddr.setPassive(true);
+ resourceAddr.setPassword("asdf");
+ resourceAddr.setPort("5000");
+ resourceAddr.setRemotepath("/home/per");
+ resourceAddr.setUser("nancy");
+ performanceAddr.setFtptype("sftp");
+ performanceAddr.setIp("127.0.0.1");
+ performanceAddr.setPassive(true);
+ performanceAddr.setPassword("asdf");
+ performanceAddr.setPort("5000");
+ performanceAddr.setRemotepath("/home/per");
+ performanceAddr.setUser("nancy");
+ emsRegisterInfo.setName("EMS_TEST");
+ emsRegisterInfo.setVendor("ZTE");
+ emsRegisterInfo.setVersion("V1");
+ emsRegisterInfo.setAlarmAddr(alarmAddr);
+ emsRegisterInfo.setResourceAddr(resourceAddr);
+ emsRegisterInfo.setPerformanceAddr(performanceAddr);
+ esrEms = emsManagerUtil.emsRegisterInfo2EsrEms(emsRegisterInfo);
+ esrEms.setEmsId("123456");
+ esrEms.getEsrSystemInfoList().getEsrSystemInfo().get(0).setEsrSystemInfoId("234567");
+ esrEms.getEsrSystemInfoList().getEsrSystemInfo().get(1).setEsrSystemInfoId("345678");
+ esrEms.getEsrSystemInfoList().getEsrSystemInfo().get(2).setEsrSystemInfoId("456789");
+ String esremsStr = new ExtsysUtil().objectToString(esrEms);
+ String expect = "{\"ems-id\":\"123456\"," + "\"esr-system-info-list\":" + "{\"esr-system-info\":"
+ + "[{\"esr-system-info-id\":\"234567\"," + "\"system-name\":\"EMS_TEST\"," + "\"type\":\"sftp\","
+ + "\"vendor\":\"ZTE\"," + "\"version\":\"V1\"," + "\"user-name\":\"nancy\"," + "\"password\":\"asdf\","
+ + "\"system-type\":\"EMS_RESOUCE\"," + "\"ip-address\":\"127.0.0.1\"," + "\"port\":\"5000\","
+ + "\"passive\":true," + "\"remote-path\":\"/home/per\"}," + "{\"esr-system-info-id\":\"345678\","
+ + "\"system-name\":\"EMS_TEST\"," + "\"type\":\"sftp\"," + "\"vendor\":\"ZTE\"," + "\"version\":\"V1\","
+ + "\"user-name\":\"nancy\"," + "\"password\":\"asdf\"," + "\"system-type\":\"EMS_PERFORMANCE\","
+ + "\"ip-address\":\"127.0.0.1\"," + "\"port\":\"5000\"," + "\"passive\":true,"
+ + "\"remote-path\":\"/home/per\"}," + "{\"esr-system-info-id\":\"456789\","
+ + "\"system-name\":\"EMS_TEST\"," + "\"vendor\":\"ZTE\"," + "\"version\":\"V1\","
+ + "\"user-name\":\"nancy\"," + "\"password\":\"987654\"," + "\"system-type\":\"EMS_ALARM\","
+ + "\"ip-address\":\"127.0.0.1\"," + "\"port\":\"5000\"}]}}";
+ assertEquals(expect, esremsStr);
+ }
+
+ @Test
+ public void EsrEms2EmsRegisterInfoTest() {
+ EsrEmsDetail esrEms = new EsrEmsDetail();
+ EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
+ EmsManagerUtil emsManagerUtil = new EmsManagerUtil();
+ String esrEmsStr = "{\"ems-id\":\"123456\"," + "\"esr-system-info-list\":" + "{\"esr-system-info\":"
+ + "[{\"esr-system-info-id\":\"234567\"," + "\"system-name\":\"EMS_TEST\"," + "\"type\":\"sftp\","
+ + "\"vendor\":\"ZTE\"," + "\"version\":\"V1\"," + "\"user-name\":\"nancy\"," + "\"password\":\"asdf\","
+ + "\"system-type\":\"EMS_RESOUCE\"," + "\"ip-address\":\"127.0.0.1\"," + "\"port\":\"5000\","
+ + "\"passive\":true," + "\"remote-path\":\"/home/per\"}," + "{\"esr-system-info-id\":\"345678\","
+ + "\"system-name\":\"EMS_TEST\"," + "\"type\":\"sftp\"," + "\"vendor\":\"ZTE\"," + "\"version\":\"V1\","
+ + "\"user-name\":\"nancy\"," + "\"password\":\"asdf\"," + "\"system-type\":\"EMS_PERFORMANCE\","
+ + "\"ip-address\":\"127.0.0.1\"," + "\"port\":\"5000\"," + "\"passive\":true,"
+ + "\"remote-path\":\"/home/per\"}," + "{\"esr-system-info-id\":\"456789\","
+ + "\"system-name\":\"EMS_TEST\"," + "\"vendor\":\"ZTE\"," + "\"version\":\"V1\","
+ + "\"user-name\":\"nancy\"," + "\"password\":\"987654\"," + "\"system-type\":\"EMS_ALARM\","
+ + "\"ip-address\":\"127.0.0.1\"," + "\"port\":\"5000\"}]}}";
+ esrEms = new Gson().fromJson(esrEmsStr, EsrEmsDetail.class);
+ emsRegisterInfo = emsManagerUtil.EsrEms2EmsRegisterInfo(esrEms);
+ String registerInfoStr = new ExtsysUtil().objectToString(emsRegisterInfo);
+ String expectRegisterInfo = "{\"emsId\":\"123456\"," + "\"name\":\"EMS_TEST\"," + "\"vendor\":\"ZTE\","
+ + "\"version\":\"V1\"," + "\"resourceAddr\":{" + "\"ftptype\":\"sftp\"," + "\"ip\":\"127.0.0.1\","
+ + "\"port\":\"5000\"," + "\"user\":\"nancy\"," + "\"password\":\"asdf\","
+ + "\"remotepath\":\"/home/per\"," + "\"passive\":true}," + "\"performanceAddr\":{"
+ + "\"ftptype\":\"sftp\"," + "\"ip\":\"127.0.0.1\"," + "\"port\":\"5000\"," + "\"user\":\"nancy\","
+ + "\"password\":\"asdf\"," + "\"remotepath\":\"/home/per\"," + "\"passive\":true}," + "\"alarmAddr\":{"
+ + "\"ip\":\"127.0.0.1\"," + "\"port\":\"5000\"," + "\"user\":\"nancy\"," + "\"password\":\"987654\"}}";
+ assertEquals(registerInfoStr, expectRegisterInfo);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/util/ExtsysUtilTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/util/ExtsysUtilTest.java
index 7e71571..08468ed 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/util/ExtsysUtilTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/util/ExtsysUtilTest.java
@@ -16,125 +16,97 @@
package org.onap.aai.esr.util;
import static org.junit.Assert.assertEquals;
-
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
import org.onap.aai.esr.entity.aai.EsrSystemInfo;
import org.onap.aai.esr.entity.aai.EsrSystemInfoList;
import org.onap.aai.esr.externalservice.cloud.Tenant;
public class ExtsysUtilTest {
-
- @Test
- public void objectToStringTest() {
- ExtsysUtil extsysUtil = new ExtsysUtil();
- Tenant tenant = new Tenant();
- tenant.setDefaultTenant("admin");
- String tenantStr = "{\"defaultTenant\":\"admin\"}";
- String result = extsysUtil.objectToString(tenant);
- assertEquals(tenantStr, result);
- }
-
-
- @Test
- public void getEsrSystemInfoListFromAuthInfoTest() {
- EsrSystemInfo esrSystemInfoObj = new EsrSystemInfo();
- ExtsysUtil extsysUtil = new ExtsysUtil();
- EsrSystemInfoList result = new EsrSystemInfoList();
- esrSystemInfoObj.setCloudDomain("cloudDomain");
- esrSystemInfoObj.setDefaultTenant("admin");
- esrSystemInfoObj.setEsrSystemInfoId("123456");
- esrSystemInfoObj.setIpAddress("127.0.0.1");
- esrSystemInfoObj.setPassive(true);
- esrSystemInfoObj.setPassword("qwelk");
- esrSystemInfoObj.setPort("5000");
- esrSystemInfoObj.setProtocol("http");
- esrSystemInfoObj.setRemotePath("/root/test");
- esrSystemInfoObj.setServiceUrl("http://127.0.0.1:8080");
- esrSystemInfoObj.setSslCassert("sslCassert");
- esrSystemInfoObj.setSslInsecure(false);
- esrSystemInfoObj.setSystemName("vnfm");
- esrSystemInfoObj.setSystemStatus("normal");
- esrSystemInfoObj.setSystemType("VNFM");
- esrSystemInfoObj.setType("test");
- esrSystemInfoObj.setUserName("root");
- esrSystemInfoObj.setVendor("zte");
- esrSystemInfoObj.setVersion("v1.0");
- result = extsysUtil.getEsrSystemInfoListFromAuthInfo(esrSystemInfoObj);
-
- String listStr = "{\"esr-system-info\":[{"
- + "\"esr-system-info-id\":\"123456\","
- + "\"system-name\":\"vnfm\","
- + "\"type\":\"test\","
- + "\"vendor\":\"zte\","
- + "\"version\":\"v1.0\","
- + "\"service-url\":\"http://127.0.0.1:8080\","
- + "\"user-name\":\"root\","
- + "\"password\":\"qwelk\","
- + "\"system-type\":\"VNFM\","
- + "\"protocol\":\"http\","
- + "\"ssl-cassert\":\"sslCassert\","
- + "\"ssl-insecure\":false,"
- + "\"ip-address\":\"127.0.0.1\","
- + "\"port\":\"5000\","
- + "\"cloud-domain\":\"cloudDomain\","
- + "\"default-tenant\":\"admin\","
- + "\"passive\":true,"
- + "\"remote-path\":\"/root/test\","
- + "\"system-status\":\"normal\"}]}";
- assertEquals(extsysUtil.objectToString(result), listStr);
- }
-
- @Test
- public void getEsrSystemInfoListFromAuthInfoListTest() {
- List<EsrSystemInfo> esrSystemInfos = new ArrayList<>();
- EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
- EsrSystemInfo esrSystemInfoObj = new EsrSystemInfo();
- ExtsysUtil extsysUtil = new ExtsysUtil();
- esrSystemInfoObj.setCloudDomain("cloudDomain");
- esrSystemInfoObj.setDefaultTenant("admin");
- esrSystemInfoObj.setEsrSystemInfoId("123456");
- esrSystemInfoObj.setIpAddress("127.0.0.1");
- esrSystemInfoObj.setPassive(true);
- esrSystemInfoObj.setPassword("qwelk");
- esrSystemInfoObj.setPort("5000");
- esrSystemInfoObj.setProtocol("http");
- esrSystemInfoObj.setRemotePath("/root/test");
- esrSystemInfoObj.setServiceUrl("http://127.0.0.1:8080");
- esrSystemInfoObj.setSslCassert("sslCassert");
- esrSystemInfoObj.setSslInsecure(false);
- esrSystemInfoObj.setSystemName("vnfm");
- esrSystemInfoObj.setSystemStatus("normal");
- esrSystemInfoObj.setSystemType("VNFM");
- esrSystemInfoObj.setType("test");
- esrSystemInfoObj.setUserName("root");
- esrSystemInfoObj.setVendor("zte");
- esrSystemInfoObj.setVersion("v1.0");
- esrSystemInfos.add(esrSystemInfoObj);
- esrSystemInfoList.setEsrSystemInfo(esrSystemInfos);
-
- String listStr = "{\"esr-system-info\":[{"
- + "\"esr-system-info-id\":\"123456\","
- + "\"system-name\":\"vnfm\","
- + "\"type\":\"test\","
- + "\"vendor\":\"zte\","
- + "\"version\":\"v1.0\","
- + "\"service-url\":\"http://127.0.0.1:8080\","
- + "\"user-name\":\"root\","
- + "\"password\":\"qwelk\","
- + "\"system-type\":\"VNFM\","
- + "\"protocol\":\"http\","
- + "\"ssl-cassert\":\"sslCassert\","
- + "\"ssl-insecure\":false,"
- + "\"ip-address\":\"127.0.0.1\","
- + "\"port\":\"5000\","
- + "\"cloud-domain\":\"cloudDomain\","
- + "\"default-tenant\":\"admin\","
- + "\"passive\":true,"
- + "\"remote-path\":\"/root/test\","
- + "\"system-status\":\"normal\"}]}";
- assertEquals(extsysUtil.objectToString(esrSystemInfoList), listStr);
- }
+
+ @Test
+ public void objectToStringTest() {
+ ExtsysUtil extsysUtil = new ExtsysUtil();
+ Tenant tenant = new Tenant();
+ tenant.setDefaultTenant("admin");
+ String tenantStr = "{\"defaultTenant\":\"admin\"}";
+ String result = extsysUtil.objectToString(tenant);
+ assertEquals(tenantStr, result);
+ }
+
+
+ @Test
+ public void getEsrSystemInfoListFromAuthInfoTest() {
+ EsrSystemInfo esrSystemInfoObj = new EsrSystemInfo();
+ ExtsysUtil extsysUtil = new ExtsysUtil();
+ EsrSystemInfoList result = new EsrSystemInfoList();
+ esrSystemInfoObj.setCloudDomain("cloudDomain");
+ esrSystemInfoObj.setDefaultTenant("admin");
+ esrSystemInfoObj.setEsrSystemInfoId("123456");
+ esrSystemInfoObj.setIpAddress("127.0.0.1");
+ esrSystemInfoObj.setPassive(true);
+ esrSystemInfoObj.setPassword("qwelk");
+ esrSystemInfoObj.setPort("5000");
+ esrSystemInfoObj.setProtocol("http");
+ esrSystemInfoObj.setRemotePath("/root/test");
+ esrSystemInfoObj.setServiceUrl("http://127.0.0.1:8080");
+ esrSystemInfoObj.setSslCassert("sslCassert");
+ esrSystemInfoObj.setSslInsecure(false);
+ esrSystemInfoObj.setSystemName("vnfm");
+ esrSystemInfoObj.setSystemStatus("normal");
+ esrSystemInfoObj.setSystemType("VNFM");
+ esrSystemInfoObj.setType("test");
+ esrSystemInfoObj.setUserName("root");
+ esrSystemInfoObj.setVendor("zte");
+ esrSystemInfoObj.setVersion("v1.0");
+ result = extsysUtil.getEsrSystemInfoListFromAuthInfo(esrSystemInfoObj);
+
+ String listStr = "{\"esr-system-info\":[{" + "\"esr-system-info-id\":\"123456\"," + "\"system-name\":\"vnfm\","
+ + "\"type\":\"test\"," + "\"vendor\":\"zte\"," + "\"version\":\"v1.0\","
+ + "\"service-url\":\"http://127.0.0.1:8080\"," + "\"user-name\":\"root\"," + "\"password\":\"qwelk\","
+ + "\"system-type\":\"VNFM\"," + "\"protocol\":\"http\"," + "\"ssl-cassert\":\"sslCassert\","
+ + "\"ssl-insecure\":false," + "\"ip-address\":\"127.0.0.1\"," + "\"port\":\"5000\","
+ + "\"cloud-domain\":\"cloudDomain\"," + "\"default-tenant\":\"admin\"," + "\"passive\":true,"
+ + "\"remote-path\":\"/root/test\"," + "\"system-status\":\"normal\"}]}";
+ assertEquals(extsysUtil.objectToString(result), listStr);
+ }
+
+ @Test
+ public void getEsrSystemInfoListFromAuthInfoListTest() {
+ List<EsrSystemInfo> esrSystemInfos = new ArrayList<>();
+ EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
+ EsrSystemInfo esrSystemInfoObj = new EsrSystemInfo();
+ ExtsysUtil extsysUtil = new ExtsysUtil();
+ esrSystemInfoObj.setCloudDomain("cloudDomain");
+ esrSystemInfoObj.setDefaultTenant("admin");
+ esrSystemInfoObj.setEsrSystemInfoId("123456");
+ esrSystemInfoObj.setIpAddress("127.0.0.1");
+ esrSystemInfoObj.setPassive(true);
+ esrSystemInfoObj.setPassword("qwelk");
+ esrSystemInfoObj.setPort("5000");
+ esrSystemInfoObj.setProtocol("http");
+ esrSystemInfoObj.setRemotePath("/root/test");
+ esrSystemInfoObj.setServiceUrl("http://127.0.0.1:8080");
+ esrSystemInfoObj.setSslCassert("sslCassert");
+ esrSystemInfoObj.setSslInsecure(false);
+ esrSystemInfoObj.setSystemName("vnfm");
+ esrSystemInfoObj.setSystemStatus("normal");
+ esrSystemInfoObj.setSystemType("VNFM");
+ esrSystemInfoObj.setType("test");
+ esrSystemInfoObj.setUserName("root");
+ esrSystemInfoObj.setVendor("zte");
+ esrSystemInfoObj.setVersion("v1.0");
+ esrSystemInfos.add(esrSystemInfoObj);
+ esrSystemInfoList.setEsrSystemInfo(esrSystemInfos);
+
+ String listStr = "{\"esr-system-info\":[{" + "\"esr-system-info-id\":\"123456\"," + "\"system-name\":\"vnfm\","
+ + "\"type\":\"test\"," + "\"vendor\":\"zte\"," + "\"version\":\"v1.0\","
+ + "\"service-url\":\"http://127.0.0.1:8080\"," + "\"user-name\":\"root\"," + "\"password\":\"qwelk\","
+ + "\"system-type\":\"VNFM\"," + "\"protocol\":\"http\"," + "\"ssl-cassert\":\"sslCassert\","
+ + "\"ssl-insecure\":false," + "\"ip-address\":\"127.0.0.1\"," + "\"port\":\"5000\","
+ + "\"cloud-domain\":\"cloudDomain\"," + "\"default-tenant\":\"admin\"," + "\"passive\":true,"
+ + "\"remote-path\":\"/root/test\"," + "\"system-status\":\"normal\"}]}";
+ assertEquals(extsysUtil.objectToString(esrSystemInfoList), listStr);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/util/ThirdpartySdncManagerUtilTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/util/ThirdpartySdncManagerUtilTest.java
index 8c616b6..1df5cbd 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/util/ThirdpartySdncManagerUtilTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/util/ThirdpartySdncManagerUtilTest.java
@@ -16,85 +16,58 @@
package org.onap.aai.esr.util;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
import org.onap.aai.esr.entity.aai.EsrThirdpartySdncDetail;
import org.onap.aai.esr.entity.rest.ThirdpartySdncRegisterInfo;
-
import com.google.gson.Gson;
public class ThirdpartySdncManagerUtilTest {
-
- @Test
- public void sdncRegisterInfo2EsrSdncTest() {
- ThirdpartySdncManagerUtil thirdpartySdncManagerUtil = new ThirdpartySdncManagerUtil();
- ThirdpartySdncRegisterInfo sdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- EsrThirdpartySdncDetail esrSdncDetail = new EsrThirdpartySdncDetail();
- sdncRegisterInfo.setLocation("edge");
- sdncRegisterInfo.setName("SDNC_TEST");
- sdncRegisterInfo.setPassword("123987");
- sdncRegisterInfo.setProductName("thirdparty SDNC");
- sdncRegisterInfo.setProtocol("protocol");
- sdncRegisterInfo.setThirdpartySdncId("123456");
- sdncRegisterInfo.setType("SDNC");
- sdncRegisterInfo.setUrl("http://127.0.0.1:8000");
- sdncRegisterInfo.setUserName("nancy");
- sdncRegisterInfo.setVendor("zte");
- sdncRegisterInfo.setVersion("v1");
- esrSdncDetail = thirdpartySdncManagerUtil.sdncRegisterInfo2EsrSdnc(sdncRegisterInfo);
- esrSdncDetail.setThirdpartySdncId("123456");
- esrSdncDetail.getEsrSystemInfoList().getEsrSystemInfo().get(0).setEsrSystemInfoId("987654");
- String esrSdncDetailStr = new ExtsysUtil().objectToString(esrSdncDetail);
- String expectResult = "{\"thirdparty-sdnc-id\":\"123456\","
- + "\"location\":\"edge\","
- + "\"product-name\":\"thirdparty SDNC\","
- + "\"esr-system-info-list\":{"
- + "\"esr-system-info\":"
- + "[{\"esr-system-info-id\":\"987654\","
- + "\"system-name\":\"SDNC_TEST\","
- + "\"type\":\"SDNC\","
- + "\"vendor\":\"zte\","
- + "\"version\":\"v1\","
- + "\"service-url\":\"http://127.0.0.1:8000\","
- + "\"user-name\":\"nancy\","
- + "\"password\":\"123987\","
- + "\"system-type\":\"thirdparty_SDNC\","
- + "\"protocol\":\"protocol\"}]}}";
- assertEquals(expectResult, esrSdncDetailStr);
- }
-
- @Test
- public void esrSdnc2SdncRegisterInfoTest() {
- EsrThirdpartySdncDetail esrSdnc = new EsrThirdpartySdncDetail();
- String esrSdncStr = "{\"thirdparty-sdnc-id\":\"123456\","
- + "\"location\":\"edge\","
- + "\"product-name\":\"thirdparty SDNC\","
- + "\"esr-system-info-list\":{"
- + "\"esr-system-info\":"
- + "[{\"esr-system-info-id\":\"987654\","
- + "\"system-name\":\"SDNC_TEST\","
- + "\"type\":\"SDNC\","
- + "\"vendor\":\"zte\","
- + "\"version\":\"v1\","
- + "\"service-url\":\"http://127.0.0.1:8000\","
- + "\"user-name\":\"nancy\","
- + "\"password\":\"123987\","
- + "\"system-type\":\"thirdparty_SDNC\","
- + "\"protocol\":\"protocol\"}]}}";
- esrSdnc = new Gson().fromJson(esrSdncStr, EsrThirdpartySdncDetail.class);
- ThirdpartySdncRegisterInfo registerInfo = new ThirdpartySdncManagerUtil().esrSdnc2SdncRegisterInfo(esrSdnc);
- String registerInfoStr = new ExtsysUtil().objectToString(registerInfo);
- String expectResult = "{\"thirdpartySdncId\":\"123456\","
- + "\"name\":\"SDNC_TEST\","
- + "\"vendor\":\"zte\","
- + "\"version\":\"v1\","
- + "\"type\":\"SDNC\","
- + "\"location\":\"edge\","
- + "\"url\":\"http://127.0.0.1:8000\","
- + "\"userName\":\"nancy\","
- + "\"password\":\"123987\","
- + "\"productName\":\"thirdparty SDNC\","
- + "\"protocol\":\"protocol\"}";
- assertEquals(expectResult, registerInfoStr);
- }
+
+ @Test
+ public void sdncRegisterInfo2EsrSdncTest() {
+ ThirdpartySdncManagerUtil thirdpartySdncManagerUtil = new ThirdpartySdncManagerUtil();
+ ThirdpartySdncRegisterInfo sdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ EsrThirdpartySdncDetail esrSdncDetail = new EsrThirdpartySdncDetail();
+ sdncRegisterInfo.setLocation("edge");
+ sdncRegisterInfo.setName("SDNC_TEST");
+ sdncRegisterInfo.setPassword("123987");
+ sdncRegisterInfo.setProductName("thirdparty SDNC");
+ sdncRegisterInfo.setProtocol("protocol");
+ sdncRegisterInfo.setThirdpartySdncId("123456");
+ sdncRegisterInfo.setType("SDNC");
+ sdncRegisterInfo.setUrl("http://127.0.0.1:8000");
+ sdncRegisterInfo.setUserName("nancy");
+ sdncRegisterInfo.setVendor("zte");
+ sdncRegisterInfo.setVersion("v1");
+ esrSdncDetail = thirdpartySdncManagerUtil.sdncRegisterInfo2EsrSdnc(sdncRegisterInfo);
+ esrSdncDetail.setThirdpartySdncId("123456");
+ esrSdncDetail.getEsrSystemInfoList().getEsrSystemInfo().get(0).setEsrSystemInfoId("987654");
+ String esrSdncDetailStr = new ExtsysUtil().objectToString(esrSdncDetail);
+ String expectResult = "{\"thirdparty-sdnc-id\":\"123456\"," + "\"location\":\"edge\","
+ + "\"product-name\":\"thirdparty SDNC\"," + "\"esr-system-info-list\":{" + "\"esr-system-info\":"
+ + "[{\"esr-system-info-id\":\"987654\"," + "\"system-name\":\"SDNC_TEST\"," + "\"type\":\"SDNC\","
+ + "\"vendor\":\"zte\"," + "\"version\":\"v1\"," + "\"service-url\":\"http://127.0.0.1:8000\","
+ + "\"user-name\":\"nancy\"," + "\"password\":\"123987\"," + "\"system-type\":\"thirdparty_SDNC\","
+ + "\"protocol\":\"protocol\"}]}}";
+ assertEquals(expectResult, esrSdncDetailStr);
+ }
+
+ @Test
+ public void esrSdnc2SdncRegisterInfoTest() {
+ EsrThirdpartySdncDetail esrSdnc = new EsrThirdpartySdncDetail();
+ String esrSdncStr = "{\"thirdparty-sdnc-id\":\"123456\"," + "\"location\":\"edge\","
+ + "\"product-name\":\"thirdparty SDNC\"," + "\"esr-system-info-list\":{" + "\"esr-system-info\":"
+ + "[{\"esr-system-info-id\":\"987654\"," + "\"system-name\":\"SDNC_TEST\"," + "\"type\":\"SDNC\","
+ + "\"vendor\":\"zte\"," + "\"version\":\"v1\"," + "\"service-url\":\"http://127.0.0.1:8000\","
+ + "\"user-name\":\"nancy\"," + "\"password\":\"123987\"," + "\"system-type\":\"thirdparty_SDNC\","
+ + "\"protocol\":\"protocol\"}]}}";
+ esrSdnc = new Gson().fromJson(esrSdncStr, EsrThirdpartySdncDetail.class);
+ ThirdpartySdncRegisterInfo registerInfo = new ThirdpartySdncManagerUtil().esrSdnc2SdncRegisterInfo(esrSdnc);
+ String registerInfoStr = new ExtsysUtil().objectToString(registerInfo);
+ String expectResult = "{\"thirdpartySdncId\":\"123456\"," + "\"name\":\"SDNC_TEST\"," + "\"vendor\":\"zte\","
+ + "\"version\":\"v1\"," + "\"type\":\"SDNC\"," + "\"location\":\"edge\","
+ + "\"url\":\"http://127.0.0.1:8000\"," + "\"userName\":\"nancy\"," + "\"password\":\"123987\","
+ + "\"productName\":\"thirdparty SDNC\"," + "\"protocol\":\"protocol\"}";
+ assertEquals(expectResult, registerInfoStr);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/util/VimManagerUtilTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/util/VimManagerUtilTest.java
index 202368f..9426753 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/util/VimManagerUtilTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/util/VimManagerUtilTest.java
@@ -16,115 +16,78 @@
package org.onap.aai.esr.util;
import static org.junit.Assert.assertEquals;
-
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
import org.onap.aai.esr.entity.aai.CloudRegionDetail;
import org.onap.aai.esr.entity.rest.VimAuthInfo;
import org.onap.aai.esr.entity.rest.VimRegisterInfo;
-
import com.google.gson.Gson;
public class VimManagerUtilTest {
-
- @Test
- public void vimRegisterInfo2CloudRegionTest() {
- VimManagerUtil vimManagerUtil = new VimManagerUtil();
- CloudRegionDetail cloudRegionDetail = new CloudRegionDetail();
- VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
- List<VimAuthInfo> vimAuthInfos = new ArrayList<>();
- VimAuthInfo vimAuthInfo = new VimAuthInfo();
- vimAuthInfo.setAuthUrl("http://10.11.22.33:5000/v3");
- vimAuthInfo.setCloudDomain("default");
- vimAuthInfo.setPassword("123456");
- vimAuthInfo.setSslCacert("test");
- vimAuthInfo.setSslInsecure(true);
- vimAuthInfo.setUserName("onap");
- vimAuthInfo.setDefaultTenant("admin");
- vimRegisterInfo.setCloudExtraInfo("{}");
- vimRegisterInfo.setCloudOwner("zte");
- vimRegisterInfo.setCloudRegionId("RegionOne");
- vimRegisterInfo.setCloudRegionVersion("mitaca");
- vimRegisterInfo.setCloudType("openstack");
- vimRegisterInfo.setCloudZone("default");
- vimRegisterInfo.setComplexName("complex");
- vimRegisterInfo.setOwnerDefinedType("test");
- vimRegisterInfo.setStatus("normal");
- vimAuthInfos.add(vimAuthInfo);
- vimRegisterInfo.setVimAuthInfos(vimAuthInfos);
- cloudRegionDetail = vimManagerUtil.vimRegisterInfo2CloudRegion(vimRegisterInfo);
- cloudRegionDetail.getEsrSystemInfoList().getEsrSystemInfo().get(0).setEsrSystemInfoId("123456");
- String cloudRegionDetailStr = new ExtsysUtil().objectToString(cloudRegionDetail);
- String expectResult = "{\"cloud-owner\":\"zte\","
- + "\"cloud-region-id\":\"RegionOne\","
- + "\"cloud-type\":\"openstack\","
- + "\"cloud-region-version\":\"mitaca\","
- + "\"owner-defined-type\":\"test\","
- + "\"cloud-zone\":\"default\","
- + "\"complex-name\":\"complex\","
- + "\"cloud-extra-info\":\"{}\","
- + "\"esr-system-info-list\":{"
- + "\"esr-system-info\":[{"
- + "\"esr-system-info-id\":\"123456\","
- + "\"service-url\":\"http://10.11.22.33:5000/v3\","
- + "\"user-name\":\"onap\","
- + "\"password\":\"123456\","
- + "\"system-type\":\"VIM\","
- + "\"ssl-cassert\":\"test\","
- + "\"ssl-insecure\":true,"
- + "\"cloud-domain\":\"default\","
- + "\"default-tenant\":\"admin\","
- + "\"system-status\":\"normal\"}]}}";
- assertEquals(expectResult, cloudRegionDetailStr);
- }
-
- @Test
- public void cloudRegion2VimRegisterInfoTest() {
- VimManagerUtil vimManagerUtil = new VimManagerUtil();
- CloudRegionDetail cloudRegionDetail = new CloudRegionDetail();
- VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
- String cloudRegionDetailStr = "{\"cloud-owner\":\"zte\","
- + "\"cloud-region-id\":\"RegionOne\","
- + "\"cloud-type\":\"openstack\","
- + "\"cloud-region-version\":\"mitaca\","
- + "\"owner-defined-type\":\"test\","
- + "\"cloud-zone\":\"default\","
- + "\"complex-name\":\"complex\","
- + "\"cloud-extra-info\":\"{}\","
- + "\"esr-system-info-list\":{"
- + "\"esr-system-info\":[{"
- + "\"esr-system-info-id\":\"123456\","
- + "\"service-url\":\"http://10.11.22.33:5000/v3\","
- + "\"user-name\":\"onap\","
- + "\"password\":\"123456\","
- + "\"default-tenant\":\"admin\","
- + "\"system-type\":\"VIM\","
- + "\"ssl-cassert\":\"test\","
- + "\"ssl-insecure\":true,"
- + "\"cloud-domain\":\"default\","
- + "\"system-status\":\"normal\"}]}}";
- cloudRegionDetail = new Gson().fromJson(cloudRegionDetailStr, CloudRegionDetail.class);
- vimRegisterInfo = vimManagerUtil.cloudRegion2VimRegisterInfo(cloudRegionDetail);
- String vimRegisterInfoStr = new ExtsysUtil().objectToString(vimRegisterInfo);
- String expectResult = "{\"cloudOwner\":\"zte\","
- + "\"cloudRegionId\":\"RegionOne\","
- + "\"cloudType\":\"openstack\","
- + "\"cloudRegionVersion\":\"mitaca\","
- + "\"ownerDefinedType\":\"test\","
- + "\"cloudZone\":\"default\","
- + "\"complexName\":\"complex\","
- + "\"cloudExtraInfo\":\"{}\","
- + "\"status\":\"normal\","
- + "\"vimAuthInfos\":[{"
- + "\"cloudDomain\":\"default\","
- + "\"userName\":\"onap\","
- + "\"password\":\"123456\","
- + "\"authUrl\":\"http://10.11.22.33:5000/v3\","
- + "\"defaultTenant\":\"admin\","
- + "\"sslCacert\":\"test\","
- + "\"sslInsecure\":true}]}";
- assertEquals(expectResult, vimRegisterInfoStr);
- }
+
+ @Test
+ public void vimRegisterInfo2CloudRegionTest() {
+ VimManagerUtil vimManagerUtil = new VimManagerUtil();
+ CloudRegionDetail cloudRegionDetail = new CloudRegionDetail();
+ VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
+ List<VimAuthInfo> vimAuthInfos = new ArrayList<>();
+ VimAuthInfo vimAuthInfo = new VimAuthInfo();
+ vimAuthInfo.setAuthUrl("http://10.11.22.33:5000/v3");
+ vimAuthInfo.setCloudDomain("default");
+ vimAuthInfo.setPassword("123456");
+ vimAuthInfo.setSslCacert("test");
+ vimAuthInfo.setSslInsecure(true);
+ vimAuthInfo.setUserName("onap");
+ vimAuthInfo.setDefaultTenant("admin");
+ vimRegisterInfo.setCloudExtraInfo("{}");
+ vimRegisterInfo.setCloudOwner("zte");
+ vimRegisterInfo.setCloudRegionId("RegionOne");
+ vimRegisterInfo.setCloudRegionVersion("mitaca");
+ vimRegisterInfo.setCloudType("openstack");
+ vimRegisterInfo.setCloudZone("default");
+ vimRegisterInfo.setComplexName("complex");
+ vimRegisterInfo.setOwnerDefinedType("test");
+ vimRegisterInfo.setStatus("normal");
+ vimAuthInfos.add(vimAuthInfo);
+ vimRegisterInfo.setVimAuthInfos(vimAuthInfos);
+ cloudRegionDetail = vimManagerUtil.vimRegisterInfo2CloudRegion(vimRegisterInfo);
+ cloudRegionDetail.getEsrSystemInfoList().getEsrSystemInfo().get(0).setEsrSystemInfoId("123456");
+ String cloudRegionDetailStr = new ExtsysUtil().objectToString(cloudRegionDetail);
+ String expectResult = "{\"cloud-owner\":\"zte\"," + "\"cloud-region-id\":\"RegionOne\","
+ + "\"cloud-type\":\"openstack\"," + "\"cloud-region-version\":\"mitaca\","
+ + "\"owner-defined-type\":\"test\"," + "\"cloud-zone\":\"default\"," + "\"complex-name\":\"complex\","
+ + "\"cloud-extra-info\":\"{}\"," + "\"esr-system-info-list\":{" + "\"esr-system-info\":[{"
+ + "\"esr-system-info-id\":\"123456\"," + "\"service-url\":\"http://10.11.22.33:5000/v3\","
+ + "\"user-name\":\"onap\"," + "\"password\":\"123456\"," + "\"system-type\":\"VIM\","
+ + "\"ssl-cassert\":\"test\"," + "\"ssl-insecure\":true," + "\"cloud-domain\":\"default\","
+ + "\"default-tenant\":\"admin\"," + "\"system-status\":\"normal\"}]}}";
+ assertEquals(expectResult, cloudRegionDetailStr);
+ }
+
+ @Test
+ public void cloudRegion2VimRegisterInfoTest() {
+ VimManagerUtil vimManagerUtil = new VimManagerUtil();
+ CloudRegionDetail cloudRegionDetail = new CloudRegionDetail();
+ VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
+ String cloudRegionDetailStr = "{\"cloud-owner\":\"zte\"," + "\"cloud-region-id\":\"RegionOne\","
+ + "\"cloud-type\":\"openstack\"," + "\"cloud-region-version\":\"mitaca\","
+ + "\"owner-defined-type\":\"test\"," + "\"cloud-zone\":\"default\"," + "\"complex-name\":\"complex\","
+ + "\"cloud-extra-info\":\"{}\"," + "\"esr-system-info-list\":{" + "\"esr-system-info\":[{"
+ + "\"esr-system-info-id\":\"123456\"," + "\"service-url\":\"http://10.11.22.33:5000/v3\","
+ + "\"user-name\":\"onap\"," + "\"password\":\"123456\"," + "\"default-tenant\":\"admin\","
+ + "\"system-type\":\"VIM\"," + "\"ssl-cassert\":\"test\"," + "\"ssl-insecure\":true,"
+ + "\"cloud-domain\":\"default\"," + "\"system-status\":\"normal\"}]}}";
+ cloudRegionDetail = new Gson().fromJson(cloudRegionDetailStr, CloudRegionDetail.class);
+ vimRegisterInfo = vimManagerUtil.cloudRegion2VimRegisterInfo(cloudRegionDetail);
+ String vimRegisterInfoStr = new ExtsysUtil().objectToString(vimRegisterInfo);
+ String expectResult = "{\"cloudOwner\":\"zte\"," + "\"cloudRegionId\":\"RegionOne\","
+ + "\"cloudType\":\"openstack\"," + "\"cloudRegionVersion\":\"mitaca\","
+ + "\"ownerDefinedType\":\"test\"," + "\"cloudZone\":\"default\"," + "\"complexName\":\"complex\","
+ + "\"cloudExtraInfo\":\"{}\"," + "\"status\":\"normal\"," + "\"vimAuthInfos\":[{"
+ + "\"cloudDomain\":\"default\"," + "\"userName\":\"onap\"," + "\"password\":\"123456\","
+ + "\"authUrl\":\"http://10.11.22.33:5000/v3\"," + "\"defaultTenant\":\"admin\","
+ + "\"sslCacert\":\"test\"," + "\"sslInsecure\":true}]}";
+ assertEquals(expectResult, vimRegisterInfoStr);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/util/VnfmManagerUtilTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/util/VnfmManagerUtilTest.java
index bc7eea1..db888bd 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/util/VnfmManagerUtilTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/util/VnfmManagerUtilTest.java
@@ -16,82 +16,58 @@
package org.onap.aai.esr.util;
import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
import org.onap.aai.esr.entity.aai.EsrVnfmDetail;
import org.onap.aai.esr.entity.rest.VnfmRegisterInfo;
-
import com.google.gson.Gson;
public class VnfmManagerUtilTest {
- @Test
- public void vnfmRegisterInfo2EsrVnfmTest() {
- VnfmManagerUtil vnfmManagerUtil = new VnfmManagerUtil();
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- EsrVnfmDetail esrVnfmDetail = new EsrVnfmDetail();
- vnfmRegisterInfo.setVimId("987654");
- vnfmRegisterInfo.setVersion("v1");
- vnfmRegisterInfo.setVendor("zte");
- vnfmRegisterInfo.setUserName("onap");
- vnfmRegisterInfo.setUrl("http://10.11.22.33:8000");
- vnfmRegisterInfo.setType("vnfm");
- vnfmRegisterInfo.setPassword("987654");
- vnfmRegisterInfo.setName("ONAP VNFM");
- vnfmRegisterInfo.setCertificateUrl("http://11.22.33.44:5000/v3");
- esrVnfmDetail = vnfmManagerUtil.vnfmRegisterInfo2EsrVnfm(vnfmRegisterInfo);
- esrVnfmDetail.setVnfmId("123456");
- esrVnfmDetail.getEsrSystemInfoList().getEsrSystemInfo().get(0).setEsrSystemInfoId("qwerty");
- String esrVnfmDetailStr = new ExtsysUtil().objectToString(esrVnfmDetail);
- String expectResult = "{\"vnfm-id\":\"123456\","
- + "\"vim-id\":\"987654\","
- + "\"certificate-url\":\"http://11.22.33.44:5000/v3\","
- + "\"esr-system-info-list\":{"
- + "\"esr-system-info\":[{"
- + "\"esr-system-info-id\":\"qwerty\","
- + "\"system-name\":\"ONAP VNFM\","
- + "\"type\":\"vnfm\","
- + "\"vendor\":\"zte\","
- + "\"version\":\"v1\","
- + "\"service-url\":\"http://10.11.22.33:8000\","
- + "\"user-name\":\"onap\","
- + "\"password\":\"987654\","
- + "\"system-type\":\"VNFM\"}]}}";
- assertEquals(expectResult, esrVnfmDetailStr);
- }
-
- @Test
- public void esrVnfm2VnfmRegisterInfoTest() {
- VnfmManagerUtil vnfmManagerUtil = new VnfmManagerUtil();
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- EsrVnfmDetail esrVnfmDetail = new EsrVnfmDetail();
- String esrVnfmDetailStr = "{\"vnfm-id\":\"123456\","
- + "\"vim-id\":\"987654\","
- + "\"certificate-url\":\"http://11.22.33.44:5000/v3\","
- + "\"esr-system-info-list\":{"
- + "\"esr-system-info\":[{"
- + "\"esr-system-info-id\":\"qwerty\","
- + "\"system-name\":\"ONAP VNFM\","
- + "\"type\":\"vnfm\","
- + "\"vendor\":\"zte\","
- + "\"version\":\"v1\","
- + "\"service-url\":\"http://10.11.22.33:8000\","
- + "\"user-name\":\"onap\","
- + "\"password\":\"987654\","
- + "\"system-type\":\"VNFM\"}]}}";
- esrVnfmDetail = new Gson().fromJson(esrVnfmDetailStr, EsrVnfmDetail.class);
- vnfmRegisterInfo = vnfmManagerUtil.esrVnfm2VnfmRegisterInfo(esrVnfmDetail);
- String vnfmRegisterInfoStr = new ExtsysUtil().objectToString(vnfmRegisterInfo);
- String expectResult = "{\"vnfmId\":\"123456\","
- + "\"name\":\"ONAP VNFM\","
- + "\"type\":\"vnfm\","
- + "\"vimId\":\"987654\","
- + "\"vendor\":\"zte\","
- + "\"version\":\"v1\","
- + "\"certificateUrl\":\"http://11.22.33.44:5000/v3\","
- + "\"url\":\"http://10.11.22.33:8000\","
- + "\"userName\":\"onap\","
- + "\"password\":\"987654\"}";
- assertEquals(expectResult, vnfmRegisterInfoStr);
- }
+ @Test
+ public void vnfmRegisterInfo2EsrVnfmTest() {
+ VnfmManagerUtil vnfmManagerUtil = new VnfmManagerUtil();
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ EsrVnfmDetail esrVnfmDetail = new EsrVnfmDetail();
+ vnfmRegisterInfo.setVimId("987654");
+ vnfmRegisterInfo.setVersion("v1");
+ vnfmRegisterInfo.setVendor("zte");
+ vnfmRegisterInfo.setUserName("onap");
+ vnfmRegisterInfo.setUrl("http://10.11.22.33:8000");
+ vnfmRegisterInfo.setType("vnfm");
+ vnfmRegisterInfo.setPassword("987654");
+ vnfmRegisterInfo.setName("ONAP VNFM");
+ vnfmRegisterInfo.setCertificateUrl("http://11.22.33.44:5000/v3");
+ esrVnfmDetail = vnfmManagerUtil.vnfmRegisterInfo2EsrVnfm(vnfmRegisterInfo);
+ esrVnfmDetail.setVnfmId("123456");
+ esrVnfmDetail.getEsrSystemInfoList().getEsrSystemInfo().get(0).setEsrSystemInfoId("qwerty");
+ String esrVnfmDetailStr = new ExtsysUtil().objectToString(esrVnfmDetail);
+ String expectResult = "{\"vnfm-id\":\"123456\"," + "\"vim-id\":\"987654\","
+ + "\"certificate-url\":\"http://11.22.33.44:5000/v3\"," + "\"esr-system-info-list\":{"
+ + "\"esr-system-info\":[{" + "\"esr-system-info-id\":\"qwerty\"," + "\"system-name\":\"ONAP VNFM\","
+ + "\"type\":\"vnfm\"," + "\"vendor\":\"zte\"," + "\"version\":\"v1\","
+ + "\"service-url\":\"http://10.11.22.33:8000\"," + "\"user-name\":\"onap\","
+ + "\"password\":\"987654\"," + "\"system-type\":\"VNFM\"}]}}";
+ assertEquals(expectResult, esrVnfmDetailStr);
+ }
+
+ @Test
+ public void esrVnfm2VnfmRegisterInfoTest() {
+ VnfmManagerUtil vnfmManagerUtil = new VnfmManagerUtil();
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ EsrVnfmDetail esrVnfmDetail = new EsrVnfmDetail();
+ String esrVnfmDetailStr = "{\"vnfm-id\":\"123456\"," + "\"vim-id\":\"987654\","
+ + "\"certificate-url\":\"http://11.22.33.44:5000/v3\"," + "\"esr-system-info-list\":{"
+ + "\"esr-system-info\":[{" + "\"esr-system-info-id\":\"qwerty\"," + "\"system-name\":\"ONAP VNFM\","
+ + "\"type\":\"vnfm\"," + "\"vendor\":\"zte\"," + "\"version\":\"v1\","
+ + "\"service-url\":\"http://10.11.22.33:8000\"," + "\"user-name\":\"onap\","
+ + "\"password\":\"987654\"," + "\"system-type\":\"VNFM\"}]}}";
+ esrVnfmDetail = new Gson().fromJson(esrVnfmDetailStr, EsrVnfmDetail.class);
+ vnfmRegisterInfo = vnfmManagerUtil.esrVnfm2VnfmRegisterInfo(esrVnfmDetail);
+ String vnfmRegisterInfoStr = new ExtsysUtil().objectToString(vnfmRegisterInfo);
+ String expectResult = "{\"vnfmId\":\"123456\"," + "\"name\":\"ONAP VNFM\"," + "\"type\":\"vnfm\","
+ + "\"vimId\":\"987654\"," + "\"vendor\":\"zte\"," + "\"version\":\"v1\","
+ + "\"certificateUrl\":\"http://11.22.33.44:5000/v3\"," + "\"url\":\"http://10.11.22.33:8000\","
+ + "\"userName\":\"onap\"," + "\"password\":\"987654\"}";
+ assertEquals(expectResult, vnfmRegisterInfoStr);
+ }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/wrapper/EmsManagerWrapperTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/wrapper/EmsManagerWrapperTest.java
new file mode 100644
index 0000000..78237d7
--- /dev/null
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/wrapper/EmsManagerWrapperTest.java
@@ -0,0 +1,37 @@
+/**
+ * Copyright 2018 ZTE Corporation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.aai.esr.wrapper;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.aai.esr.common.MsbConfig;
+
+public class EmsManagerWrapperTest {
+ private static EmsManagerWrapper emsManagerWrapper;
+ static {
+ MsbConfig.setMsbServerAddr("http://127.0.0.1:80");
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ emsManagerWrapper = EmsManagerWrapper.getInstance();
+ }
+
+ @Test
+ public void test_registerEms() {
+
+ }
+}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/wrapper/ThirdpartySdncWrapperTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/wrapper/ThirdpartySdncWrapperTest.java
index 6afd179..e39adc7 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/wrapper/ThirdpartySdncWrapperTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/wrapper/ThirdpartySdncWrapperTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2017 ZTE Corporation.
+ * Copyright 2018 ZTE Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,12 +16,9 @@
package org.onap.aai.esr.wrapper;
import static org.junit.Assert.assertEquals;
-
import java.util.ArrayList;
import java.util.List;
-
import javax.ws.rs.core.Response;
-
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -32,117 +29,117 @@ import org.onap.aai.esr.util.ExtsysUtil;
public class ThirdpartySdncWrapperTest {
- private static ThirdpartySdncWrapper thirdpartySdncWrapper;
- static {
- MsbConfig.setMsbServerAddr("http://127.0.0.1:80");
- }
-
- @Before
- public void setUp() throws Exception {
- thirdpartySdncWrapper = ThirdpartySdncWrapper.getInstance();
- }
-
- @Test
- public void test_registerThirdpartySdnc() {
- ExternalSystemProxy.isTest = true;
- ThirdpartySdncRegisterInfo sdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- sdncRegisterInfo.setLocation("edge");
- sdncRegisterInfo.setName("SDNC_TEST");
- sdncRegisterInfo.setPassword("123987");
- sdncRegisterInfo.setProductName("thirdparty SDNC");
- sdncRegisterInfo.setProtocol("protocol");
- sdncRegisterInfo.setThirdpartySdncId("123456");
- sdncRegisterInfo.setType("SDNC");
- sdncRegisterInfo.setUrl("http://127.0.0.1:8000");
- sdncRegisterInfo.setUserName("nancy");
- sdncRegisterInfo.setVendor("zte");
- sdncRegisterInfo.setVersion("v1");
- Response response = thirdpartySdncWrapper.registerThirdpartySdnc(sdncRegisterInfo);
- if (response != null) {
- Assert.assertTrue(response.getStatus() == 200);
+ private static ThirdpartySdncWrapper thirdpartySdncWrapper;
+ static {
+ MsbConfig.setMsbServerAddr("http://127.0.0.1:80");
}
- ExternalSystemProxy.isTest = false;
- }
-
- @Test
- public void test_delThirdpartySdnc() {
- ExternalSystemProxy.isTest = true;
- Response response = thirdpartySdncWrapper.delThirdpartySdnc("123456");
- if (response != null) {
- Assert.assertTrue(response.getStatus() == 204);
+
+ @Before
+ public void setUp() throws Exception {
+ thirdpartySdncWrapper = ThirdpartySdncWrapper.getInstance();
}
- ExternalSystemProxy.isTest = false;
- }
-
- @Test
- public void test_queryThirdpartySdncById() {
- ExternalSystemProxy.isTest = true;
- ExtsysUtil extsysUtil = new ExtsysUtil();
- ThirdpartySdncRegisterInfo sdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- sdncRegisterInfo.setLocation("edge");
- sdncRegisterInfo.setName("SDNC_TEST");
- sdncRegisterInfo.setPassword("123987");
- sdncRegisterInfo.setProductName("thirdparty SDNC");
- sdncRegisterInfo.setProtocol("protocol");
- sdncRegisterInfo.setThirdpartySdncId("123456");
- sdncRegisterInfo.setType("SDNC");
- sdncRegisterInfo.setUrl("http://127.0.0.1:8000");
- sdncRegisterInfo.setUserName("nancy");
- sdncRegisterInfo.setVendor("zte");
- sdncRegisterInfo.setVersion("v1");
- Response response = thirdpartySdncWrapper.queryThirdpartySdncById("123456");
- if (response != null) {
- Assert.assertTrue(response.getStatus() == 200);
- assertEquals(extsysUtil.objectToString(sdncRegisterInfo), extsysUtil.objectToString(response.getEntity()));
+
+ @Test
+ public void test_registerThirdpartySdnc() {
+ ExternalSystemProxy.isTest = true;
+ ThirdpartySdncRegisterInfo sdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ sdncRegisterInfo.setLocation("edge");
+ sdncRegisterInfo.setName("SDNC_TEST");
+ sdncRegisterInfo.setPassword("123987");
+ sdncRegisterInfo.setProductName("thirdparty SDNC");
+ sdncRegisterInfo.setProtocol("protocol");
+ sdncRegisterInfo.setThirdpartySdncId("123456");
+ sdncRegisterInfo.setType("SDNC");
+ sdncRegisterInfo.setUrl("http://127.0.0.1:8000");
+ sdncRegisterInfo.setUserName("nancy");
+ sdncRegisterInfo.setVendor("zte");
+ sdncRegisterInfo.setVersion("v1");
+ Response response = thirdpartySdncWrapper.registerThirdpartySdnc(sdncRegisterInfo);
+ if (response != null) {
+ Assert.assertTrue(response.getStatus() == 200);
+ }
+ ExternalSystemProxy.isTest = false;
}
- ExternalSystemProxy.isTest = false;
- }
-
- @Test
- public void test_queryThirdpartySdncList() {
- ExternalSystemProxy.isTest = true;
- ExtsysUtil extsysUtil = new ExtsysUtil();
- List<ThirdpartySdncRegisterInfo> sdncList = new ArrayList<>();
- ThirdpartySdncRegisterInfo sdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- sdncRegisterInfo.setLocation("edge");
- sdncRegisterInfo.setName("SDNC_TEST");
- sdncRegisterInfo.setPassword("123987");
- sdncRegisterInfo.setProductName("thirdparty SDNC");
- sdncRegisterInfo.setProtocol("protocol");
- sdncRegisterInfo.setThirdpartySdncId("123456");
- sdncRegisterInfo.setType("SDNC");
- sdncRegisterInfo.setUrl("http://127.0.0.1:8000");
- sdncRegisterInfo.setUserName("nancy");
- sdncRegisterInfo.setVendor("zte");
- sdncRegisterInfo.setVersion("v1");
- sdncList.add(sdncRegisterInfo);
- Response response = thirdpartySdncWrapper.queryThirdpartySdncList();
- if (response != null) {
- Assert.assertTrue(response.getStatus() == 200);
- assertEquals(extsysUtil.objectToString(sdncList), extsysUtil.objectToString(response.getEntity()));
+
+ @Test
+ public void test_delThirdpartySdnc() {
+ ExternalSystemProxy.isTest = true;
+ Response response = thirdpartySdncWrapper.delThirdpartySdnc("123456");
+ if (response != null) {
+ Assert.assertTrue(response.getStatus() == 204);
+ }
+ ExternalSystemProxy.isTest = false;
}
- ExternalSystemProxy.isTest = false;
- }
-
- @Test
- public void test_updateThirdpartySdnc() {
- ExternalSystemProxy.isTest = true;
- ThirdpartySdncRegisterInfo sdncRegisterInfo = new ThirdpartySdncRegisterInfo();
- sdncRegisterInfo.setLocation("edge");
- sdncRegisterInfo.setName("SDNC_TEST");
- sdncRegisterInfo.setPassword("123987");
- sdncRegisterInfo.setProductName("thirdparty SDNC");
- sdncRegisterInfo.setProtocol("protocol");
- sdncRegisterInfo.setThirdpartySdncId("123456");
- sdncRegisterInfo.setType("SDNC");
- sdncRegisterInfo.setUrl("http://127.0.0.1:8000");
- sdncRegisterInfo.setUserName("nancy");
- sdncRegisterInfo.setVendor("zte");
- sdncRegisterInfo.setVersion("v1");
- Response response = thirdpartySdncWrapper.updateThirdpartySdnc(sdncRegisterInfo, "123456");
- if (response != null) {
- Assert.assertTrue(response.getStatus() == 200);
+
+ @Test
+ public void test_queryThirdpartySdncById() {
+ ExternalSystemProxy.isTest = true;
+ ExtsysUtil extsysUtil = new ExtsysUtil();
+ ThirdpartySdncRegisterInfo sdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ sdncRegisterInfo.setLocation("edge");
+ sdncRegisterInfo.setName("SDNC_TEST");
+ sdncRegisterInfo.setPassword("123987");
+ sdncRegisterInfo.setProductName("thirdparty SDNC");
+ sdncRegisterInfo.setProtocol("protocol");
+ sdncRegisterInfo.setThirdpartySdncId("123456");
+ sdncRegisterInfo.setType("SDNC");
+ sdncRegisterInfo.setUrl("http://127.0.0.1:8000");
+ sdncRegisterInfo.setUserName("nancy");
+ sdncRegisterInfo.setVendor("zte");
+ sdncRegisterInfo.setVersion("v1");
+ Response response = thirdpartySdncWrapper.queryThirdpartySdncById("123456");
+ if (response != null) {
+ Assert.assertTrue(response.getStatus() == 200);
+ assertEquals(extsysUtil.objectToString(sdncRegisterInfo), extsysUtil.objectToString(response.getEntity()));
+ }
+ ExternalSystemProxy.isTest = false;
+ }
+
+ @Test
+ public void test_queryThirdpartySdncList() {
+ ExternalSystemProxy.isTest = true;
+ ExtsysUtil extsysUtil = new ExtsysUtil();
+ List<ThirdpartySdncRegisterInfo> sdncList = new ArrayList<>();
+ ThirdpartySdncRegisterInfo sdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ sdncRegisterInfo.setLocation("edge");
+ sdncRegisterInfo.setName("SDNC_TEST");
+ sdncRegisterInfo.setPassword("123987");
+ sdncRegisterInfo.setProductName("thirdparty SDNC");
+ sdncRegisterInfo.setProtocol("protocol");
+ sdncRegisterInfo.setThirdpartySdncId("123456");
+ sdncRegisterInfo.setType("SDNC");
+ sdncRegisterInfo.setUrl("http://127.0.0.1:8000");
+ sdncRegisterInfo.setUserName("nancy");
+ sdncRegisterInfo.setVendor("zte");
+ sdncRegisterInfo.setVersion("v1");
+ sdncList.add(sdncRegisterInfo);
+ Response response = thirdpartySdncWrapper.queryThirdpartySdncList();
+ if (response != null) {
+ Assert.assertTrue(response.getStatus() == 200);
+ assertEquals(extsysUtil.objectToString(sdncList), extsysUtil.objectToString(response.getEntity()));
+ }
+ ExternalSystemProxy.isTest = false;
+ }
+
+ @Test
+ public void test_updateThirdpartySdnc() {
+ ExternalSystemProxy.isTest = true;
+ ThirdpartySdncRegisterInfo sdncRegisterInfo = new ThirdpartySdncRegisterInfo();
+ sdncRegisterInfo.setLocation("edge");
+ sdncRegisterInfo.setName("SDNC_TEST");
+ sdncRegisterInfo.setPassword("123987");
+ sdncRegisterInfo.setProductName("thirdparty SDNC");
+ sdncRegisterInfo.setProtocol("protocol");
+ sdncRegisterInfo.setThirdpartySdncId("123456");
+ sdncRegisterInfo.setType("SDNC");
+ sdncRegisterInfo.setUrl("http://127.0.0.1:8000");
+ sdncRegisterInfo.setUserName("nancy");
+ sdncRegisterInfo.setVendor("zte");
+ sdncRegisterInfo.setVersion("v1");
+ Response response = thirdpartySdncWrapper.updateThirdpartySdnc(sdncRegisterInfo, "123456");
+ if (response != null) {
+ Assert.assertTrue(response.getStatus() == 200);
+ }
+ ExternalSystemProxy.isTest = false;
}
- ExternalSystemProxy.isTest = false;
- }
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/wrapper/VnfmManagerWrapperTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/wrapper/VnfmManagerWrapperTest.java
index 735e169..bfc9afd 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/wrapper/VnfmManagerWrapperTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/wrapper/VnfmManagerWrapperTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2017 ZTE Corporation.
+ * Copyright 2018 ZTE Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,12 +16,9 @@
package org.onap.aai.esr.wrapper;
import static org.junit.Assert.assertEquals;
-
import java.util.ArrayList;
import java.util.List;
-
import javax.ws.rs.core.Response;
-
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -32,112 +29,112 @@ import org.onap.aai.esr.util.ExtsysUtil;
public class VnfmManagerWrapperTest {
- private static VnfmManagerWrapper vnfmManagerWrapper;
- static {
- MsbConfig.setMsbServerAddr("http://127.0.0.1:80");
- }
+ private static VnfmManagerWrapper vnfmManagerWrapper;
+ static {
+ MsbConfig.setMsbServerAddr("http://127.0.0.1:80");
+ }
- @Before
- public void setUp() throws Exception {
- vnfmManagerWrapper = VnfmManagerWrapper.getInstance();
- }
+ @Before
+ public void setUp() throws Exception {
+ vnfmManagerWrapper = VnfmManagerWrapper.getInstance();
+ }
- @Test
- public void test_registerVnfm() {
- ExternalSystemProxy.isTest = true;
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- vnfmRegisterInfo.setVimId("987654");
- vnfmRegisterInfo.setVersion("v1");
- vnfmRegisterInfo.setVendor("zte");
- vnfmRegisterInfo.setUserName("onap");
- vnfmRegisterInfo.setUrl("http://10.11.22.33:8000");
- vnfmRegisterInfo.setType("vnfm");
- vnfmRegisterInfo.setPassword("987654");
- vnfmRegisterInfo.setName("ONAP VNFM");
- vnfmRegisterInfo.setCertificateUrl("http://11.22.33.44:5000/v3");
- Response response = vnfmManagerWrapper.registerVnfm(vnfmRegisterInfo);
- if (response != null) {
- Assert.assertTrue(response.getStatus() == 200);
+ @Test
+ public void test_registerVnfm() {
+ ExternalSystemProxy.isTest = true;
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ vnfmRegisterInfo.setVimId("987654");
+ vnfmRegisterInfo.setVersion("v1");
+ vnfmRegisterInfo.setVendor("zte");
+ vnfmRegisterInfo.setUserName("onap");
+ vnfmRegisterInfo.setUrl("http://10.11.22.33:8000");
+ vnfmRegisterInfo.setType("vnfm");
+ vnfmRegisterInfo.setPassword("987654");
+ vnfmRegisterInfo.setName("ONAP VNFM");
+ vnfmRegisterInfo.setCertificateUrl("http://11.22.33.44:5000/v3");
+ Response response = vnfmManagerWrapper.registerVnfm(vnfmRegisterInfo);
+ if (response != null) {
+ Assert.assertTrue(response.getStatus() == 200);
+ }
+ ExternalSystemProxy.isTest = false;
}
- ExternalSystemProxy.isTest = false;
- }
-
- @Test
- public void test_queryVnfmById() {
- ExternalSystemProxy.isTest = true;
- ExtsysUtil extsysUtil = new ExtsysUtil();
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- vnfmRegisterInfo.setVimId("987654");
- vnfmRegisterInfo.setVersion("v1");
- vnfmRegisterInfo.setVendor("zte");
- vnfmRegisterInfo.setUserName("onap");
- vnfmRegisterInfo.setUrl("http://10.11.22.33:8000");
- vnfmRegisterInfo.setType("vnfm");
- vnfmRegisterInfo.setPassword("987654");
- vnfmRegisterInfo.setName("ONAP VNFM");
- vnfmRegisterInfo.setCertificateUrl("http://11.22.33.44:5000/v3");
- vnfmRegisterInfo.setVnfmId("123456");
- Response response = vnfmManagerWrapper.queryVnfmById("123456");
- if (response != null) {
- Assert.assertTrue(response.getStatus() == 200);
- assertEquals(extsysUtil.objectToString(vnfmRegisterInfo), extsysUtil.objectToString(response.getEntity()));
+
+ @Test
+ public void test_queryVnfmById() {
+ ExternalSystemProxy.isTest = true;
+ ExtsysUtil extsysUtil = new ExtsysUtil();
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ vnfmRegisterInfo.setVimId("987654");
+ vnfmRegisterInfo.setVersion("v1");
+ vnfmRegisterInfo.setVendor("zte");
+ vnfmRegisterInfo.setUserName("onap");
+ vnfmRegisterInfo.setUrl("http://10.11.22.33:8000");
+ vnfmRegisterInfo.setType("vnfm");
+ vnfmRegisterInfo.setPassword("987654");
+ vnfmRegisterInfo.setName("ONAP VNFM");
+ vnfmRegisterInfo.setCertificateUrl("http://11.22.33.44:5000/v3");
+ vnfmRegisterInfo.setVnfmId("123456");
+ Response response = vnfmManagerWrapper.queryVnfmById("123456");
+ if (response != null) {
+ Assert.assertTrue(response.getStatus() == 200);
+ assertEquals(extsysUtil.objectToString(vnfmRegisterInfo), extsysUtil.objectToString(response.getEntity()));
+ }
+ ExternalSystemProxy.isTest = false;
}
- ExternalSystemProxy.isTest = false;
- }
-
- @Test
- public void test_queryVnfmList() {
- ExternalSystemProxy.isTest = true;
- ExtsysUtil extsysUtil = new ExtsysUtil();
- List<VnfmRegisterInfo> vnfmList = new ArrayList<>();
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- vnfmRegisterInfo.setVimId("987654");
- vnfmRegisterInfo.setVersion("v1");
- vnfmRegisterInfo.setVendor("zte");
- vnfmRegisterInfo.setUserName("onap");
- vnfmRegisterInfo.setUrl("http://10.11.22.33:8000");
- vnfmRegisterInfo.setType("vnfm");
- vnfmRegisterInfo.setPassword("987654");
- vnfmRegisterInfo.setName("ONAP VNFM");
- vnfmRegisterInfo.setCertificateUrl("http://11.22.33.44:5000/v3");
- vnfmRegisterInfo.setVnfmId("123456");
- vnfmList.add(vnfmRegisterInfo);
- Response response = vnfmManagerWrapper.queryVnfmList();
- if (response != null) {
- Assert.assertTrue(response.getStatus() == 200);
- assertEquals(extsysUtil.objectToString(vnfmList), extsysUtil.objectToString(response.getEntity()));
+
+ @Test
+ public void test_queryVnfmList() {
+ ExternalSystemProxy.isTest = true;
+ ExtsysUtil extsysUtil = new ExtsysUtil();
+ List<VnfmRegisterInfo> vnfmList = new ArrayList<>();
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ vnfmRegisterInfo.setVimId("987654");
+ vnfmRegisterInfo.setVersion("v1");
+ vnfmRegisterInfo.setVendor("zte");
+ vnfmRegisterInfo.setUserName("onap");
+ vnfmRegisterInfo.setUrl("http://10.11.22.33:8000");
+ vnfmRegisterInfo.setType("vnfm");
+ vnfmRegisterInfo.setPassword("987654");
+ vnfmRegisterInfo.setName("ONAP VNFM");
+ vnfmRegisterInfo.setCertificateUrl("http://11.22.33.44:5000/v3");
+ vnfmRegisterInfo.setVnfmId("123456");
+ vnfmList.add(vnfmRegisterInfo);
+ Response response = vnfmManagerWrapper.queryVnfmList();
+ if (response != null) {
+ Assert.assertTrue(response.getStatus() == 200);
+ assertEquals(extsysUtil.objectToString(vnfmList), extsysUtil.objectToString(response.getEntity()));
+ }
+ ExternalSystemProxy.isTest = false;
}
- ExternalSystemProxy.isTest = false;
- }
-
- @Test
- public void test_delVnfm() {
- ExternalSystemProxy.isTest = true;
- Response response = vnfmManagerWrapper.delVnfm("123456");
- if(response != null) {
- Assert.assertTrue(response.getStatus() == 204);
+
+ @Test
+ public void test_delVnfm() {
+ ExternalSystemProxy.isTest = true;
+ Response response = vnfmManagerWrapper.delVnfm("123456");
+ if (response != null) {
+ Assert.assertTrue(response.getStatus() == 204);
+ }
+ ExternalSystemProxy.isTest = false;
}
- ExternalSystemProxy.isTest = false;
- }
-
- @Test
- public void test_updateVnfm() {
- ExternalSystemProxy.isTest = true;
- VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
- vnfmRegisterInfo.setVimId("987654");
- vnfmRegisterInfo.setVersion("v1");
- vnfmRegisterInfo.setVendor("zte");
- vnfmRegisterInfo.setUserName("onap");
- vnfmRegisterInfo.setUrl("http://10.11.22.33:8000");
- vnfmRegisterInfo.setType("vnfm");
- vnfmRegisterInfo.setPassword("987654");
- vnfmRegisterInfo.setName("ONAP VNFM");
- vnfmRegisterInfo.setCertificateUrl("http://11.22.33.44:5000/v3");
- vnfmRegisterInfo.setVnfmId("123456");
- Response response = vnfmManagerWrapper.updateVnfm(vnfmRegisterInfo, "123456");
- if(response != null) {
- Assert.assertTrue(response.getStatus() == 200);
+
+ @Test
+ public void test_updateVnfm() {
+ ExternalSystemProxy.isTest = true;
+ VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo();
+ vnfmRegisterInfo.setVimId("987654");
+ vnfmRegisterInfo.setVersion("v1");
+ vnfmRegisterInfo.setVendor("zte");
+ vnfmRegisterInfo.setUserName("onap");
+ vnfmRegisterInfo.setUrl("http://10.11.22.33:8000");
+ vnfmRegisterInfo.setType("vnfm");
+ vnfmRegisterInfo.setPassword("987654");
+ vnfmRegisterInfo.setName("ONAP VNFM");
+ vnfmRegisterInfo.setCertificateUrl("http://11.22.33.44:5000/v3");
+ vnfmRegisterInfo.setVnfmId("123456");
+ Response response = vnfmManagerWrapper.updateVnfm(vnfmRegisterInfo, "123456");
+ if (response != null) {
+ Assert.assertTrue(response.getStatus() == 200);
+ }
+ ExternalSystemProxy.isTest = false;
}
- ExternalSystemProxy.isTest = false;
- }
}