summaryrefslogtreecommitdiffstats
path: root/esr-mgr
diff options
context:
space:
mode:
authorlizi00164331 <li.zi30@zte.com.cn>2017-09-20 16:24:49 +0800
committerlizi00164331 <li.zi30@zte.com.cn>2017-09-20 16:24:49 +0800
commit16ca2a55b06a657b9592aa6ed0e45755b177e320 (patch)
treeaee2c7ca2dfc2fbaa294092324d6757893688046 /esr-mgr
parent9779223be91efce3a909be643d4085ff110a3c30 (diff)
Add unit case for thirdparty sdnc bean.
Change-Id: I1d4e61c17cfc17c3646be8cd82441daca00ebef1 Issue-ID: AAI-350 Signed-off-by: lizi00164331 <li.zi30@zte.com.cn>
Diffstat (limited to 'esr-mgr')
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsDetailTest.java6
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsListTest.java8
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncDetailTest.java69
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncListTest.java35
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncTest.java54
5 files changed, 165 insertions, 7 deletions
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 c2fcf2d..eb1f619 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
@@ -47,8 +47,8 @@ public class EsrEmsDetailTest {
esrSystemInfoObj.setEsrSystemInfoId("123");
esrSystemInfo.add(esrSystemInfoObj );
esrSystemInfoList.setEsrSystemInfo(esrSystemInfo);
- EsrEmsDetail cloudRegion = new EsrEmsDetail();
- cloudRegion.setEsrSystemInfoList(esrSystemInfoList);
- assertEquals(cloudRegion.getEsrSystemInfoList(), esrSystemInfoList);
+ 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 ccbe58a..3da7aaa 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
@@ -23,13 +23,13 @@ import org.junit.Test;
public class EsrEmsListTest {
@Test
- public void getterAndSetter4cloudRegion() {
- EsrEmsList cloudRegionList = new EsrEmsList();
+ public void getterAndSetter4EsrEmsList() {
+ EsrEmsList esrEmsList = new EsrEmsList();
ArrayList<EsrEms> esrEmses = new ArrayList<EsrEms>();
EsrEms esrEms = new EsrEms();
esrEms.setEmsId("123");
esrEmses.add(esrEms);
- cloudRegionList.setEsrEms(esrEmses);
- assertEquals(cloudRegionList.getEsrEms(), esrEmses);
+ esrEmsList.setEsrEms(esrEmses);
+ assertEquals(esrEmsList.getEsrEms(), esrEmses);
}
}
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
new file mode 100644
index 0000000..e83a6f9
--- /dev/null
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncDetailTest.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright 2017 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.entity.aai;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+
+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();
+ ArrayList<EsrSystemInfo> esrSystemInfo = new ArrayList<EsrSystemInfo>();
+ 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
new file mode 100644
index 0000000..2a531b4
--- /dev/null
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncListTest.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright 2017 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.entity.aai;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+
+import org.junit.Test;
+
+public class EsrThirdpartySdncListTest {
+ @Test
+ public void getterAndSetter4EsrThirdpartySdncList() {
+ EsrThirdpartySdncList esrThirdpartySdncList = new EsrThirdpartySdncList();
+ ArrayList<EsrThirdpartySdnc> esrThirdpartySdncs = new ArrayList<EsrThirdpartySdnc>();
+ 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
new file mode 100644
index 0000000..6f757b5
--- /dev/null
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncTest.java
@@ -0,0 +1,54 @@
+/**
+ * Copyright 2017 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.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);
+ }
+}