

Public Member Functions | |
| AlarmContainerTest () throws Exception | |
| void | testContainerSize () throws Exception |
| void | testAlarmsRemove () throws Exception |
| void | testRemoveOldest () throws Exception |
| void | testReplaceAlarm () throws Exception |
| void | testRemoveInactivAls () throws Exception |
Protected Member Functions | |
| void | setUp () throws Exception |
| void | tearDown () throws Exception |
Private Member Functions | |
| int | populateContainer (int size, String fm, Collection< Alarm > generatedAlarms, Collection< AlarmTableEntry > entries) throws Exception |
Private Attributes | |
| final int | CONTAINER_SIZE = 10000 |
| AlarmsReductionContainer | container |
AlarmContainerTest tests AlarmsContainer
After building an AlarmsContainer, the test stresses each of its methods in both situations i.e. with and without reductions.
| alma::acs::alarm::test::panel::AlarmContainerTest::AlarmContainerTest | ( | ) | throws Exception [inline] |
Constructor
| Exception |
| int alma::acs::alarm::test::panel::AlarmContainerTest::populateContainer | ( | int | size, | |
| String | fm, | |||
| Collection< Alarm > | generatedAlarms, | |||
| Collection< AlarmTableEntry > | entries | |||
| ) | throws Exception [inline, private] |
Populate the container with the passed number of randomly generated alarms.
| size | The number of alarms to add to the container | |
| fm | The fault family of the added alarms | |
| generatedAlarms | A Collection containing the generated alarms; it can be null; if it is not null, the newly generated alarms are added to the collection. | |
| entries | The AlarmtableEntry generated while adding alarms to the container it can be null; if it is not null, the newly generated entries are added to the collection. |
References alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::add(), container, cern::laser::client::data::Alarm::getStatus(), and cern::laser::client::data::Status::isReduced().
Referenced by testAlarmsRemove(), testContainerSize(), testRemoveInactivAls(), testRemoveOldest(), and testReplaceAlarm().
| void alma::acs::alarm::test::panel::AlarmContainerTest::setUp | ( | ) | throws Exception [inline, protected] |
Reimplemented from alma::acs::component::client::ComponentClientTestCase.
References container, and CONTAINER_SIZE.
| void alma::acs::alarm::test::panel::AlarmContainerTest::tearDown | ( | ) | throws Exception [inline, protected] |
| void alma::acs::alarm::test::panel::AlarmContainerTest::testAlarmsRemove | ( | ) | throws Exception [inline] |
Test the removal of alarms
| Exception |
References container, CONTAINER_SIZE, populateContainer(), alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::remove(), and alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::size().
| void alma::acs::alarm::test::panel::AlarmContainerTest::testContainerSize | ( | ) | throws Exception [inline] |
Check the size of the container
| Exception |
References alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::add(), alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::clear(), container, CONTAINER_SIZE, populateContainer(), and alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::size().
| void alma::acs::alarm::test::panel::AlarmContainerTest::testRemoveInactivAls | ( | ) | throws Exception [inline] |
Test the removal of inactive alarms
| Exception |
References alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::clear(), container, CONTAINER_SIZE, populateContainer(), alma::acsplugins::alarmsystem::gui::table::AlarmsContainer::removeInactiveAlarms(), and alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::size().
| void alma::acs::alarm::test::panel::AlarmContainerTest::testRemoveOldest | ( | ) | throws Exception [inline] |
Test removeOldest()
| Exception |
References container, CONTAINER_SIZE, populateContainer(), alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::removeOldest(), and alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::size().
| void alma::acs::alarm::test::panel::AlarmContainerTest::testReplaceAlarm | ( | ) | throws Exception [inline] |
Test replaceAlarm()
| Exception |
References container, CONTAINER_SIZE, alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::get(), alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::getAlarmId(), cern::laser::client::data::Alarm::getAlarmId(), alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::getStatus(), cern::laser::client::data::Alarm::getStatus(), cern::laser::client::data::Status::isActive(), populateContainer(), alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::replace(), and alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::size().
The container to test
Referenced by populateContainer(), setUp(), tearDown(), testAlarmsRemove(), testContainerSize(), testRemoveInactivAls(), testRemoveOldest(), and testReplaceAlarm().
final int alma::acs::alarm::test::panel::AlarmContainerTest::CONTAINER_SIZE = 10000 [private] |
The max number of alarms in the container
Referenced by setUp(), testAlarmsRemove(), testContainerSize(), testRemoveInactivAls(), testRemoveOldest(), and testReplaceAlarm().
1.6.2