

Public Member Functions | |
| TestAlarmDAO () throws Exception | |
| void | setUp () throws Exception |
| void | tearDown () throws Exception |
| void | testAlarmIDs () throws Exception |
| void | testGetAlarmID () throws Exception |
| void | testResponsiblePerson () throws Exception |
| void | testGetSources () throws Exception |
| void | testFindAlarm () throws Exception |
| void | testDeleteAlarm () |
Private Types | |
| enum | AlarmTriplets { TEST_TM1_1 = ("TEST:TEST_MEMBER1:1",2,"Test alarm 1","The cause","Run and fix quickly","A disaster"), TEST_TM1_2 = ("TEST:TEST_MEMBER1:2",3,"Test alarm 2",null,null,null), TEST_TM2_1 = ("TEST:TEST_MEMBER2:1",2,"Test alarm 1","The cause","Run and fix quickly","A disaster"), TEST_TM2_2 = ("TEST:TEST_MEMBER2:2",3,"Test alarm 2",null,null,null), TEST_DEF_1 = ("TEST:*:1",2,"Test alarm 1","The cause","Run and fix quickly","A disaster"), TEST_DEF_2 = ("TEST:*:2",3,"Test alarm 2",null,null,null), PS_PSM_1 = ("PS:PS_MEMBER:1",2,"PS test alarm","A terrible mistake",null,null), IDL = ("IDLFamily:IDLMember:1",0,"This alarm has been sent through an IDL method","Sent an IDL alarm",null,null) } |
Private Attributes | |
| ACSAlarmDAOImpl | alarmDAO |
Test the alarm definitions read from the CDB
enum alma::acs::lasercore::test::TestAlarmDAO::AlarmTriplets [private] |
| alma::acs::lasercore::test::TestAlarmDAO::TestAlarmDAO | ( | ) | throws Exception [inline] |
Constructor
| Exception |
| void alma::acs::lasercore::test::TestAlarmDAO::setUp | ( | ) | throws Exception [inline] |
Reimplemented from alma::acs::component::client::ComponentClientTestCase.
References alarmDAO, alma::acs::component::client::ComponentClientTestCase::getContainerServices(), com::cosylab::acs::laser::dao::ACSAlarmDAOImpl::loadAlarms(), and com::cosylab::acs::laser::dao::ACSAlarmDAOImpl::setConfAccessor().
| void alma::acs::lasercore::test::TestAlarmDAO::tearDown | ( | ) | throws Exception [inline] |
Reimplemented from alma::acs::component::client::ComponentClientTestCase.
| void alma::acs::lasercore::test::TestAlarmDAO::testAlarmIDs | ( | ) | throws Exception [inline] |
Check the getting of all the alarm IDs
The ID of an alarm is given by its triplet
| Exception |
References alarmDAO, and com::cosylab::acs::laser::dao::ACSAlarmDAOImpl::getAllAlarmIDs().
| void alma::acs::lasercore::test::TestAlarmDAO::testDeleteAlarm | ( | ) | [inline] |
| void alma::acs::lasercore::test::TestAlarmDAO::testFindAlarm | ( | ) | throws Exception [inline] |
Find alarm is like getAlarm but throws an exception if the alarm is not found
| Exception |
References alarmDAO, com::cosylab::acs::laser::dao::ACSAlarmDAOImpl::findAlarm(), and cern::laser::business::data::Alarm::getAlarmId().
| void alma::acs::lasercore::test::TestAlarmDAO::testGetAlarmID | ( | ) | throws Exception [inline] |
Test the getting of alarms by their ID.
it check the alarm, its ID, its triplet, its priority, its description, action, cause, consequence
References alarmDAO, cern::laser::business::data::Alarm::getAction(), com::cosylab::acs::laser::dao::ACSAlarmDAOImpl::getAlarm(), cern::laser::business::data::Alarm::getAlarmId(), cern::laser::business::data::Alarm::getCause(), cern::laser::business::data::Alarm::getConsequence(), cern::laser::business::data::Triplet::getFaultCode(), cern::laser::business::data::Triplet::getFaultFamily(), cern::laser::business::data::Triplet::getFaultMember(), cern::laser::business::data::Alarm::getPriority(), cern::laser::business::data::Alarm::getProblemDescription(), and cern::laser::business::data::Alarm::getTriplet().
| void alma::acs::lasercore::test::TestAlarmDAO::testGetSources | ( | ) | throws Exception [inline] |
Test the sources read from CDB (only one at the moment)
| Exception |
References alarmDAO, cern::laser::business::data::Source::getDescription(), cern::laser::business::data::Source::getName(), cern::laser::business::data::Source::getSourceId(), and com::cosylab::acs::laser::dao::ACSAlarmDAOImpl::getSources().
| void alma::acs::lasercore::test::TestAlarmDAO::testResponsiblePerson | ( | ) | throws Exception [inline] |
Test the setting of the responsible person by getting PS and one of the TEST member
| Exception |
References alarmDAO, com::cosylab::acs::laser::dao::ACSAlarmDAOImpl::getAlarm(), and cern::laser::business::data::Alarm::getResponsiblePerson().
Referenced by setUp(), testAlarmIDs(), testDeleteAlarm(), testFindAlarm(), testGetAlarmID(), testGetSources(), and testResponsiblePerson().
1.6.2