public class ComponentClientTestCase
extends TestCase
ACS.manager).
Provides the ContainerServices.| Modifier and Type | Field and Description |
|---|---|
protected AcsCorba |
acsCorba |
protected AcsManagerProxy |
m_acsManagerProxy
Special tests that need to call directly the manager API could use this proxy object.
|
protected AcsLogger |
m_logger |
protected java.lang.String |
m_managerLoc
from property ACS.manager, or defaults to localhost
|
| Constructor and Description |
|---|
ComponentClientTestCase(java.lang.String name)
Subclasses must call this ctor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
connectToManager()
Connects to the ACS Manager using
AcsManagerProxy. |
protected ContainerServices |
getContainerServices()
Gives access to the
ContainerServices interface. |
protected java.lang.String |
getFullName() |
protected LogReceiver |
getLogReceiver()
Gets a
LogReceiver which can be used
to verify log messages from both local and remote processes. |
protected void |
initRemoteLogging()
Sets up the test client logger(s) to send log records to the remote log service.
|
protected void |
runTest()
Executes a single test method.
|
protected void |
setUp()
Starts CORBA in the client process and connects to the manager and logger.
|
protected void |
tearDown()
Releases all previously obtained components (using manager), logs out from the manager,
and terminates the CORBA ORB.
|
protected AcsCorba acsCorba
protected AcsManagerProxy m_acsManagerProxy
protected AcsLogger m_logger
protected java.lang.String m_managerLoc
public ComponentClientTestCase(java.lang.String name)
throws java.lang.Exception
name - the name used for the test case, and to talk with the ACS managerjava.lang.Exceptionprotected void runTest()
throws java.lang.Throwable
java.lang.Throwablejunit.framework.TestCase#runTest()protected void setUp()
throws java.lang.Exception
Subclasses that override this method must call super.setUp(),
likely before any other code in that method.
java.lang.Exceptionjunit.framework.TestCase#setUp()protected void connectToManager()
throws java.lang.Exception
AcsManagerProxy.java.lang.Exceptionprotected java.lang.String getFullName()
protected ContainerServices getContainerServices()
ContainerServices interface.
This class plays the part of the role of the Java container that has to do with
providing explicit services to the component, or test case respectively.
protected void tearDown()
throws java.lang.Exception
Subclasses that override this method must call super.tearDown(), likely after any other code in that method.
java.lang.Exceptionjunit.framework.TestCase#tearDown()protected void initRemoteLogging()
Override this method to prevent remote logging.
protected LogReceiver getLogReceiver() throws AcsJContainerServicesEx
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).
AcsJContainerServicesEx - if the LogReceiver fails to initialize within 20 seconds.