Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::alarmsystem::clients::test::UserPropsTest Class Reference

Collaboration diagram for alma::alarmsystem::clients::test::UserPropsTest:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 UserPropsTest () throws Exception
void onAlarm (Alarm alarm)
void onException (LaserSelectionException e)
void testProperties () throws Exception
Override void faultStateReceived (FaultState faultState)

Protected Member Functions

void setUp () throws Exception
void tearDown () throws Exception

Private Member Functions

int waitForMessages (int numOfMessages)
void send_alarm (String family, String member, int code, boolean active, Properties props) throws Exception

Private Attributes

CategoryClient categoryClient
SourceClient sourceClient
Vector< AlarmalarmsReceived

Static Private Attributes

final int MAX_TIMEOUT = 120

Detailed Description

Test transmission of user defined properties from a fault state to clients.

The test is done by a couple of alarms with user properties and listening from both the sources and categories notification channels.
The checking is almost entirely delegated to tat by printing messages on the stdout.

Author:
acaproni


Constructor & Destructor Documentation

alma::alarmsystem::clients::test::UserPropsTest::UserPropsTest  )  throws Exception [inline]
 

Constructor


Member Function Documentation

Override void alma::alarmsystem::clients::test::UserPropsTest::faultStateReceived FaultState  faultState  )  [inline]
 

See also:
alma.alarmsystem.clients.source.SourceListener::faultStateReceived(cern.laser.source.alarmsysteminterface.FaultState)

void alma::alarmsystem::clients::test::UserPropsTest::onAlarm Alarm  alarm  )  [inline]
 

See also:
AlarmSelectionListener

void alma::alarmsystem::clients::test::UserPropsTest::onException LaserSelectionException  e  )  [inline]
 

See also:
AlarmSelectionListener

void alma::alarmsystem::clients::test::UserPropsTest::send_alarm String  family,
String  member,
int  code,
boolean  active,
Properties  props
throws Exception [inline, private]
 

Push an alarm

Parameters:
active If true the alarm is active

void alma::alarmsystem::clients::test::UserPropsTest::setUp  )  throws Exception [inline, protected]
 

See also:
extends ComponentClientTestCase

void alma::alarmsystem::clients::test::UserPropsTest::tearDown  )  throws Exception [inline, protected]
 

See also:
extends ComponentClientTestCase

void alma::alarmsystem::clients::test::UserPropsTest::testProperties  )  throws Exception [inline]
 

Test if the properties set while sending an alarm arrive to the CategoryClient.

The test is done by sending 2 active alarms with 2 properties and one properties respectively. The triplets of the two alarms differ only for the FC that will be used to check the correctness of the received properties.
Checking is done by listening to sources and to source NCs.

Exceptions:
Exception 

int alma::alarmsystem::clients::test::UserPropsTest::waitForMessages int  numOfMessages  )  [inline, private]
 

Wait for the messages from the alarm system.

Parameters:
numOfMessages The number of messages to wait for
Returns:
true if all the messages are received false in case of timeout (i.e. not all the messages received in MAX_TIMEOUT seconds)


Member Data Documentation

Vector<Alarm> alma::alarmsystem::clients::test::UserPropsTest::alarmsReceived [private]
 

The vector with the alarms received

CategoryClient alma::alarmsystem::clients::test::UserPropsTest::categoryClient [private]
 

The categoryClient to test

final int alma::alarmsystem::clients::test::UserPropsTest::MAX_TIMEOUT = 120 [static, private]
 

Max number of seconds to wait for the messages

SourceClient alma::alarmsystem::clients::test::UserPropsTest::sourceClient [private]
 

The source client


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:01:38 2009 for ACS Java API by doxygen 1.3.8