improve sonar coverage for uui-server 05/38805/1
authorzhangab <zhanganbing@chinamobile.com>
Tue, 27 Mar 2018 04:18:09 +0000 (12:18 +0800)
committerzhangab <zhanganbing@chinamobile.com>
Tue, 27 Mar 2018 04:18:14 +0000 (12:18 +0800)
Change-Id: If8637e55f9c7608137793c8872fabb3fdc369b84
Issue-ID: USECASEUI-103
Signed-off-by: zhangab <zhanganbing@chinamobile.com>
server/src/test/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImplTest.java

index aa30d3d..6d5d998 100644 (file)
@@ -39,12 +39,7 @@ import java.util.Date;
 * @since <pre>8, 2018</pre>
 * @version 1.0 
 */
-@RunWith(SpringJUnit4ClassRunner.class)
-@SpringBootTest(classes = UsecaseuiServerApplication.class)
-@WebAppConfiguration
 public class AlarmsHeaderServiceImplTest {
-    @Autowired
-    private AlarmsHeaderServiceImpl alarmsHeaderServiceImpl;
 
 @Before
 public void before() throws Exception { 
@@ -89,6 +84,7 @@ public void testSaveAlarmsHeader() throws Exception {
     a.setStartEpochMicrosec("wallet");
     a.setUpdateTime(DateUtils.now());
     a.setVersion("va2");
+       AlarmsHeaderServiceImpl alarmsHeaderServiceImpl = new AlarmsHeaderServiceImpl();
     System.out.println(alarmsHeaderServiceImpl.saveAlarmsHeader(a));
 }