summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhangab <zhanganbing@chinamobile.com>2018-03-29 09:48:49 +0800
committerzhangab <zhanganbing@chinamobile.com>2018-03-29 09:48:58 +0800
commitb1dc61a369f4dd88159948556be735a4c171df5d (patch)
tree6aa81854669c9642aa94034e20275743b2d43fc3
parent364fe1fe41c0f85a583842c26d8a3abef478a477 (diff)
improve sonar coverage for uui-server
Change-Id: I2c89959d45d3eab83442530f137c60f48b2524ae Issue-ID: USECASEUI-103 Signed-off-by: zhangab <zhanganbing@chinamobile.com>
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImplTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImplTest.java b/server/src/test/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImplTest.java
index 7afc0ecd..49544852 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImplTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImplTest.java
@@ -73,6 +73,12 @@ public class AlarmsHeaderServiceImplTest {
public void flush() {
}
};
+ new MockUp<SessionFactory>() {
+ @Mock
+ public Session openSession() {
+ return mockedSession.getMockInstance();
+ }
+ };
new MockUp<Transaction>() {
@Mock
public void commit() {
@@ -121,6 +127,12 @@ public class AlarmsHeaderServiceImplTest {
public void flush() {
}
};
+ new MockUp<SessionFactory>() {
+ @Mock
+ public Session openSession() {
+ return mockedSession.getMockInstance();
+ }
+ };
new MockUp<Transaction>() {
@Mock
public void getTransaction() {