summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhangab <zhanganbing@chinamobile.com>2018-04-04 12:12:15 +0800
committerzhangab <zhanganbing@chinamobile.com>2018-04-04 12:12:18 +0800
commitbfbba587f24d9c182f3a983c5fd4a4b3ed6636dd (patch)
treee465309c3c7575ce81cc7111e63f5204a78aadd0
parentc4473bd4011b4c84d7c7ef5960cf50a7b30ac64c (diff)
improve sonar coverage for uui-server
Change-Id: I141b16ca1919cd396c5193d4c9febef459f9960f 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.java11
1 files changed, 5 insertions, 6 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 2c28ad93..e5a43470 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
@@ -79,12 +79,6 @@ public class AlarmsHeaderServiceImplTest {
return mockedSession.getMockInstance();
}
};
- MockUp<Transaction> mockedTransaction = new MockUp<Transaction>() {
- @Mock
- public void commit() {
- System.out.println("shentaotest");
- }
- };
new MockUp<AlarmsHeaderServiceImpl>() {
@Mock
private Session getSession() {
@@ -104,6 +98,11 @@ public class AlarmsHeaderServiceImplTest {
@Test
public void testSaveAlarmsHeader() throws Exception {
+ new MockUp<Transaction>() {
+ @Mock
+ public void commit() {
+ }
+ };
AlarmsHeader ah = new AlarmsHeader();
ah.setEventName("a");
ah.setStatus("1");