Public Member Functions | Protected Member Functions | Protected Attributes

alma.acs.component.client.ComponentClientTestCase Class Reference

Inheritance diagram for alma.acs.component.client.ComponentClientTestCase:
alma.acsexmpl.clients.ComponentWithXmlOffshootClientTest alma.acsexmpl.clients.ErrorComponentTest alma.acsexmpl.clients.XmlComponentClientTest alma.demo.client.LampAccessClient alma.demo.client.XmlComponentClient

List of all members.

Public Member Functions

 ComponentClientTestCase (String name) throws Exception

Protected Member Functions

void runTest () throws Throwable
void setUp () throws Exception
void connectToManager () throws Exception
String getFullName ()
ContainerServices getContainerServices ()
void tearDown () throws Exception
void initRemoteLogging ()
LogReceiver getLogReceiver () throws AcsJContainerServicesEx

Protected Attributes

AcsCorba acsCorba
AcsManagerProxy m_acsManagerProxy
AcsLogger m_logger
String m_managerLoc

Detailed Description

Base class for writing JUnit test clients for ACS components. Takes care of the communication with the ACS manager (local or provided in property ACS.manager).

Provides the ContainerServices.

Author:
hsommer Nov 21, 2002 5:53:05 PM

Constructor & Destructor Documentation

alma.acs.component.client.ComponentClientTestCase.ComponentClientTestCase ( String  name  )  throws Exception

Subclasses must call this ctor.

Parameters:
name the name used for the test case, and to talk with the ACS manager
Exceptions:
Exception 

Member Function Documentation

LogReceiver alma.acs.component.client.ComponentClientTestCase.getLogReceiver (  )  throws AcsJContainerServicesEx [protected]

Gets a LogReceiver which can be used to verify log messages from both local and remote processes. The returned LogReceiver is already initialized. If initialization fails, an exception is thrown.

To receive logs from the log service, use either LogReceiver#getLogQueue() or LogReceiver#startCaptureLogs(java.io.PrintWriter).

Exceptions:
AcsJContainerServicesEx if the LogReceiver fails to initialize within 20 seconds.

References alma.acs.component.client.ComponentClientTestCase.acsCorba, alma.acs.container.AcsManagerProxy.getManager(), alma.acs.container.corba.AcsCorba.getORB(), alma.acs.logging.engine.LogReceiver.initialize(), and alma.acs.component.client.ComponentClientTestCase.m_acsManagerProxy.

void alma.acs.component.client.ComponentClientTestCase.initRemoteLogging (  )  [protected]

Sets up the test client logger(s) to send log records to the remote log service. Only one attempt to connect to the remote logger is made. If it fails, remote logging will be disabled.

Override this method to prevent remote logging.

References alma.acs.component.client.ComponentClientTestCase.acsCorba, alma.acs.container.AcsManagerProxy.getManager(), alma.acs.container.AcsManagerProxy.getManagerHandle(), alma.acs.container.corba.AcsCorba.getORB(), alma.acs.component.client.ComponentClientTestCase.m_acsManagerProxy, and alma.acs.component.client.ComponentClientTestCase.m_logger.

Referenced by alma.acs.component.client.ComponentClientTestCase.setUp().

void alma.acs.component.client.ComponentClientTestCase.runTest (  )  throws Throwable [protected]

Executes a single test method. Stray exceptions are logged using the test logger, so that they show in system logs.

See also:
junit.framework.TestCase.runTest()
Since:
ACS 6.0

References alma.acs.component.client.ComponentClientTestCase.getFullName(), alma.acs.logging.AcsLogger.log(), and alma.acs.component.client.ComponentClientTestCase.m_logger.


Member Data Documentation

from property ACS.manager, or defaults to localhost

Referenced by alma.acs.component.client.ComponentClientTestCase.connectToManager().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties