summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlizi00164331 <li.zi30@zte.com.cn>2017-09-20 16:48:46 +0800
committerlizi00164331 <li.zi30@zte.com.cn>2017-09-20 16:48:46 +0800
commitc401a51179f66ad22b462320d2b680fc6e564fdd (patch)
treedfcdb84b97bb969a6cc47674be40111486c8f7d2
parent16ca2a55b06a657b9592aa6ed0e45755b177e320 (diff)
Add unit test for VNFM bean class.
Change-Id: Icdb9009bc343d1b931126df927684e8d8cb4cc3b Issue-ID: AAI-351 Signed-off-by: lizi00164331 <li.zi30@zte.com.cn>
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmDetailTest.java69
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmListTest.java35
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmTest.java54
3 files changed, 158 insertions, 0 deletions
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
new file mode 100644
index 0000000..4dc4f0e
--- /dev/null
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmDetailTest.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 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();
+ ArrayList<EsrSystemInfo> esrSystemInfo = new ArrayList<EsrSystemInfo>();
+ 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
new file mode 100644
index 0000000..f5d5228
--- /dev/null
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmListTest.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 EsrVnfmListTest {
+ @Test
+ public void getterAndSetter4EsrVnfmList() {
+ EsrVnfmList esrVnfmList = new EsrVnfmList();
+ ArrayList<EsrVnfm> esrVnfms = new ArrayList<EsrVnfm>();
+ 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
new file mode 100644
index 0000000..efdf61d
--- /dev/null
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrVnfmTest.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 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);
+ }
+}