Add unit case for thirdparty sdnc bean. 71/13771/1
authorlizi00164331 <li.zi30@zte.com.cn>
Wed, 20 Sep 2017 08:24:49 +0000 (16:24 +0800)
committerlizi00164331 <li.zi30@zte.com.cn>
Wed, 20 Sep 2017 08:24:49 +0000 (16:24 +0800)
Change-Id: I1d4e61c17cfc17c3646be8cd82441daca00ebef1
Issue-ID: AAI-350
Signed-off-by: lizi00164331 <li.zi30@zte.com.cn>
esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsDetailTest.java
esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrEmsListTest.java
esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncDetailTest.java [new file with mode: 0644]
esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncListTest.java [new file with mode: 0644]
esr-mgr/src/test/java/org/onap/aai/esr/entity/aai/EsrThirdpartySdncTest.java [new file with mode: 0644]

index c2fcf2d..eb1f619 100644 (file)
@@ -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);
   }
 }
index ccbe58a..3da7aaa 100644 (file)
@@ -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 (file)
index 0000000..e83a6f9
--- /dev/null
@@ -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 (file)
index 0000000..2a531b4
--- /dev/null
@@ -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 (file)
index 0000000..6f757b5
--- /dev/null
@@ -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);
+  }
+}