

Public Types | |
| enum | AlarmsFromCDB { M1_1A = ("TEST", "TEST_MEMBER1", 1, true,2,"The cause","Run and fix quickly","Test alarm 1","A disaster"), M1_2A = ("TEST", "TEST_MEMBER1", 2, true,3,null,null,"Test alarm 2",null), M2_1A = ("TEST", "TEST_MEMBER2", 1, true,2,"The cause","Run and fix quickly","Test alarm 1","A disaster"), M2_2A = ("TEST", "TEST_MEMBER2", 2, true,3,null,null,"Test alarm 2",null), M1_1I = ("TEST", "TEST_MEMBER1", 1, false,2,"The cause","Run and fix quickly","Test alarm 1","A disaster"), M1_2I = ("TEST", "TEST_MEMBER1", 2, false,3,null,null,"Test alarm 2",null), M2_1I = ("TEST", "TEST_MEMBER2", 1, false,2,"The cause","Run and fix quickly","Test alarm 1","A disaster"), M2_2I = ("TEST", "TEST_MEMBER2", 2, false,3,null,null,"Test alarm 2",null) } |
Public Member Functions | |
| CategoryClientTest () throws Exception | |
| void | setUp () throws Exception |
| void | tearDown () throws Exception |
| void | onAlarm (Alarm alarm) |
| void | onException (LaserSelectionException e) |
| void | testAlarmReception () throws Exception |
Private Member Functions | |
| void | send_alarm (String family, String member, int code, boolean active) throws Exception |
| int | waitForMessages (int numOfMessages) |
Private Attributes | |
| CategoryClient | categoryClient |
| Vector< Alarm > | alarmsReceived |
Static Private Attributes | |
| static final int | MAX_TIMEOUT = 120 |
| alma::alarmsystem::clients::test::CategoryClientTest::CategoryClientTest | ( | ) | throws Exception [inline] |
Constructor
| Exception |
| void alma::alarmsystem::clients::test::CategoryClientTest::onAlarm | ( | Alarm | alarm | ) | [inline] |
Implements cern::laser::client::services::selection::AlarmSelectionListener.
References alarmsReceived.
| void alma::alarmsystem::clients::test::CategoryClientTest::onException | ( | LaserSelectionException | e | ) | [inline] |
Implements cern::laser::client::services::selection::AlarmSelectionListener.
| void alma::alarmsystem::clients::test::CategoryClientTest::send_alarm | ( | String | family, | |
| String | member, | |||
| int | code, | |||
| boolean | active | |||
| ) | throws Exception [inline, private] |
Push an alarm
| active | If true the alarm is active |
References alma::alarmsystem::source::ACSAlarmSystemInterface::push(), alma::alarmsystem::source::ACSFaultState::setDescriptor(), and alma::alarmsystem::source::ACSFaultState::setUserTimestamp().
Referenced by testAlarmReception().
| void alma::alarmsystem::clients::test::CategoryClientTest::setUp | ( | ) | throws Exception [inline] |
Reimplemented from alma::acs::component::client::ComponentClientTestCase.
References alarmsReceived, categoryClient, and alma::acs::component::client::ComponentClientTestCase::getContainerServices().
| void alma::alarmsystem::clients::test::CategoryClientTest::tearDown | ( | ) | throws Exception [inline] |
Reimplemented from alma::acs::component::client::ComponentClientTestCase.
References alarmsReceived, categoryClient, and alma::alarmsystem::clients::CategoryClient::close().
| void alma::alarmsystem::clients::test::CategoryClientTest::testAlarmReception | ( | ) | throws Exception [inline] |
Sends a couple of alarms and check if they arrive from the client
| Exception |
References alarmsReceived, categoryClient, alma::alarmsystem::clients::CategoryClient::connect(), send_alarm(), and waitForMessages().
| int alma::alarmsystem::clients::test::CategoryClientTest::waitForMessages | ( | int | numOfMessages | ) | [inline, private] |
Wait for the messages from the alarm system.
| numOfMessages | The number of messages to wait for |
References alarmsReceived, and MAX_TIMEOUT.
Referenced by testAlarmReception().
Vector<Alarm> alma::alarmsystem::clients::test::CategoryClientTest::alarmsReceived [private] |
The vector with the alarms received
Referenced by onAlarm(), setUp(), tearDown(), testAlarmReception(), and waitForMessages().
The categoryClient to test
Referenced by setUp(), tearDown(), and testAlarmReception().
final int alma::alarmsystem::clients::test::CategoryClientTest::MAX_TIMEOUT = 120 [static, private] |
Max number of seconds to wait for the messages
Referenced by waitForMessages().
1.6.2