aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxu ran <xuranyjy@chinamobile.com>2020-05-14 03:07:31 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-14 03:07:31 +0000
commitc8c25a4c797ee8bfac55d31a2c06d3d9b49d4805 (patch)
tree47dfb783f82c9f523aacf6220e7629845123fc84
parent50ce75b9eefce2df0cf6c53653dbb9cbcdd39ce6 (diff)
parentb0f3f4dff48a87b5f224c4e5338e4bc5af59c8fa (diff)
Merge "Junits for Service Instance"
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/ServiceInstanceTest.java49
1 files changed, 12 insertions, 37 deletions
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/ServiceInstanceTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/ServiceInstanceTest.java
index 8625349a..7d838e2c 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/ServiceInstanceTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/ServiceInstanceTest.java
@@ -15,52 +15,27 @@
*/
package org.onap.usecaseui.server.service.lcm.domain.aai.bean;
-import org.junit.Test;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.runner.RunWith;
-import org.onap.usecaseui.server.UuiServerApplication;
-import org.onap.usecaseui.server.service.lcm.domain.aai.bean.*;
-import org.onap.usecaseui.server.util.DateUtils;
-import org.onap.usecaseui.server.util.Page;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.web.WebAppConfiguration;
+import org.junit.Test;
+import org.junit.Assert;
-import java.sql.Timestamp;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.io.*;
-import org.hibernate.Query;
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.Transaction;
-import mockit.Mock;
-import mockit.MockUp;
+import static org.junit.Assert.assertEquals;
public class ServiceInstanceTest {
- @Before
- public void before() throws Exception {
- }
-
- @After
- public void after() throws Exception {
- }
-
@Test
public void testServiceInstance() throws Exception {
ServiceInstance si = new ServiceInstance("globalCustomerId", "serviceType", "serviceInstanceId", "subscriberName",
"subscriberType", "serviceInstanceName", "serviceInstanceLocationId");
- si.getGlobalCustomerId();
- si.getServiceType();
- si.getServiceInstanceId();
- si.getSubscriberName();
- si.getSubscriberType();
- si.getServiceInstanceName();
- si.getServiceInstanceLocationId();
+ si.setServiceDomain("serviceDomain");
+ assertEquals("globalCustomerId",si.getGlobalCustomerId());
+ assertEquals("serviceType",si.getServiceType());
+ assertEquals("serviceInstanceId",si.getServiceInstanceId());
+ assertEquals("subscriberName",si.getSubscriberName());
+ assertEquals("subscriberType",si.getSubscriberType());
+ assertEquals("serviceInstanceName",si.getServiceInstanceName());
+ assertEquals("serviceInstanceLocationId",si.getServiceInstanceLocationId());
+ assertEquals("serviceDomain",si.getServiceDomain());
}
}