/**\r
- * Copyright 2017 ZTE Corporation.\r
+ * Copyright 2017-2022 ZTE Corporation.\r
*\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
package org.onap.holmes.engine.db;\r
\r
import org.easymock.EasyMock;\r
-import org.hamcrest.core.IsNot;\r
import org.hamcrest.core.IsNull;\r
import org.junit.Assert;\r
import org.junit.Before;\r
-import org.junit.Rule;\r
import org.junit.Test;\r
-import org.junit.rules.ExpectedException;\r
import org.onap.holmes.common.api.entity.AlarmInfo;\r
-import org.onap.holmes.common.exception.AlarmInfoException;\r
import org.powermock.api.easymock.PowerMock;\r
\r
import java.util.ArrayList;\r
public class AlarmInfoDaoTest {\r
\r
\r
- private AlarmInfoDao alarmInfoDao;\r
+ private AlarmInfoDaoService alarmInfoDaoService;\r
\r
@Before\r
public void setUp() {\r
- alarmInfoDao = PowerMock.createMock(AlarmInfoDao.class);\r
+ alarmInfoDaoService = PowerMock.createMock(AlarmInfoDaoService.class);\r
}\r
\r
@Test\r
public void queryAllAlarm() throws Exception {\r
\r
- EasyMock.expect(alarmInfoDao.queryAllAlarm()).andReturn(new ArrayList<AlarmInfo>());\r
+ EasyMock.expect(alarmInfoDaoService.queryAllAlarm()).andReturn(new ArrayList<AlarmInfo>());\r
PowerMock.replayAll();\r
\r
- List<AlarmInfo> alarmInfoList = alarmInfoDao.queryAllAlarm();\r
+ List<AlarmInfo> alarmInfoList = alarmInfoDaoService.queryAllAlarm();\r
PowerMock.verifyAll();\r
Assert.assertThat(alarmInfoList, IsNull.<List<AlarmInfo>>notNullValue());\r
}\r