
Public Member Functions | |
| ContainerTestUtil (ContainerServices cs, AcsManagerProxy managerProxy) | |
| void | loginToManager () throws AcsJContainerEx |
| void | logoutFromManager () |
| LoggingConfigurable | getContainerLoggingIF (String containerName) throws AcsJContainerEx, NoPermissionEx |
| String | resolveContainerName (String componentName) throws AcsJContainerEx, NoPermissionEx |
| List< ContainerInfo > | getAllContainerInfos () throws NoPermissionEx, AcsJContainerEx |
Private Attributes | |
| final ContainerServices | containerServices |
| final AcsLogger | logger |
| final AcsManagerProxy | managerProxy |
| AcsManagerProxy | adminProxy |
Provides container access to JUnit tests. Uses JUnit asserts from Assert which means that runtime exceptions such as AssertionFailedError may be thrown.
| alma::contLogTest::TestLogLevelsCompImpl::ContainerTestUtil::ContainerTestUtil | ( | ContainerServices | cs, | |
| AcsManagerProxy | managerProxy | |||
| ) | [inline] |
The constructor only stores the parameters. You must call loginToManager() explicitly before using the other methods. Make sure to call logoutFromManager() when done.
References containerServices, alma::acs::container::ContainerServicesBase::getLogger(), and logger.
| List<ContainerInfo> alma::contLogTest::TestLogLevelsCompImpl::ContainerTestUtil::getAllContainerInfos | ( | ) | throws NoPermissionEx, AcsJContainerEx [inline] |
References adminProxy, alma::acs::container::AcsManagerProxy::getManager(), and alma::acs::container::AcsManagerProxy::getManagerHandle().
Referenced by getContainerLoggingIF().
| LoggingConfigurable alma::contLogTest::TestLogLevelsCompImpl::ContainerTestUtil::getContainerLoggingIF | ( | String | containerName | ) | throws AcsJContainerEx, NoPermissionEx [inline] |
Gets a reference to the LoggingConfigurableOperations interface of a container with a given name.
Note that only in test code like here we are allowed to talk directly with the manager. For operational code, the ContainerServices methods must be used and extended if necessary.
| containerName |
References getAllContainerInfos().
Referenced by alma::contLogTest::TestLogLevelsCompImpl::TestLogLevelsCompTest::testGetLevels(), and alma::contLogTest::TestLogLevelsCompImpl::TestLogLevelsCompTest::testLoggingConfigurableCentralLogLevels().
| void alma::contLogTest::TestLogLevelsCompImpl::ContainerTestUtil::loginToManager | ( | ) | throws AcsJContainerEx [inline] |
References si::ijs::maci::AdministratorPOATie::_this(), adminProxy, containerServices, alma::acs::container::AcsManagerProxy::createInstance(), alma::acs::container::ContainerServicesBase::getAdvancedContainerServices(), alma::acs::container::AcsManagerProxy::getManagerHandle(), alma::acs::container::ContainerServicesBase::getName(), logger, alma::acs::container::AcsManagerProxy::loginToManager(), and managerProxy.
Referenced by alma::contLogTest::TestLogLevelsCompImpl::TestLogLevelsCompTest::setUp().
| void alma::contLogTest::TestLogLevelsCompImpl::ContainerTestUtil::logoutFromManager | ( | ) | [inline] |
| String alma::contLogTest::TestLogLevelsCompImpl::ContainerTestUtil::resolveContainerName | ( | String | componentName | ) | throws AcsJContainerEx, NoPermissionEx [inline] |
Gets the name of the container running (or configured to run) the component of the given name.
References adminProxy, si::ijs::maci::ComponentInfo::container_name, alma::acs::container::AcsManagerProxy::getManager(), and alma::acs::container::AcsManagerProxy::getManagerHandle().
Referenced by alma::contLogTest::TestLogLevelsCompImpl::TestLogLevelsCompTest::testGetLevels(), and alma::contLogTest::TestLogLevelsCompImpl::TestLogLevelsCompTest::testLoggingConfigurableCentralLogLevels().
Referenced by getAllContainerInfos(), loginToManager(), logoutFromManager(), and resolveContainerName().
final ContainerServices alma::contLogTest::TestLogLevelsCompImpl::ContainerTestUtil::containerServices [private] |
Referenced by ContainerTestUtil(), and loginToManager().
Referenced by ContainerTestUtil(), and loginToManager().
final AcsManagerProxy alma::contLogTest::TestLogLevelsCompImpl::ContainerTestUtil::managerProxy [private] |
Referenced by loginToManager().
1.6.2