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

alma::acs::logging::config::LogConfigTest Class Reference

Collaboration diagram for alma::acs::logging::config::LogConfigTest:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LogConfigTest ()
void testSubscriberNotification () throws LogConfigException
void testDefaultValues () throws Exception
void testGetLogConfigXml () throws Exception
void testCDBValues () throws Exception
void testInvalidCDB () throws Exception
void testDynamicChanges () throws Exception
void testLockingRemoteLevel () throws Exception

Protected Member Functions

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

Private Member Functions

String createComponentsCdbXml (String compName, String type, String code, String container, boolean configureLogger, int minLogLevel, int minLogLevelLocal)

Private Attributes

LogConfig logConfig
Logger logger

Detailed Description

Test for LogConfig}. Does not require a running ACS environment.

Author:
hsommer


Constructor & Destructor Documentation

alma::acs::logging::config::LogConfigTest::LogConfigTest  )  [inline]
 


Member Function Documentation

String alma::acs::logging::config::LogConfigTest::createComponentsCdbXml String  compName,
String  type,
String  code,
String  container,
boolean  configureLogger,
int  minLogLevel,
int  minLogLevelLocal
[inline, private]
 

void alma::acs::logging::config::LogConfigTest::setUp  )  throws Exception [inline, protected]
 

void alma::acs::logging::config::LogConfigTest::tearDown  )  throws Exception [inline, protected]
 

void alma::acs::logging::config::LogConfigTest::testCDBValues  )  throws Exception [inline]
 

Tests logging config from the CDB, for both cases (a) that env vars beat CDB settings e.g. for normal CDB reading, (b) that CDB beats env vars e.g. during a refresh from CDB triggered via LoggingConfigurable API.

void alma::acs::logging::config::LogConfigTest::testDefaultValues  )  throws Exception [inline]
 

Tests the config values returned from LogConfig with at most env vars for default levels being set (can be enforced by TAT!), but without CDB or other information being considered.

Also asserts that none of these calls return the original object, but instead a copy of it. This indirectly exercises the equals method.

void alma::acs::logging::config::LogConfigTest::testDynamicChanges  )  throws Exception [inline]
 

Tests runtime changes as they could happen via the LoggingConfigurable} API.

void alma::acs::logging::config::LogConfigTest::testGetLogConfigXml  )  throws Exception [inline]
 

Test for the XPath based LogConfig#getLogConfigXml(String, String) which extracts log info from the XML that we get from the CDB.

void alma::acs::logging::config::LogConfigTest::testInvalidCDB  )  throws Exception [inline]
 

Checks the response to bad CDB data and CDB access problems.

void alma::acs::logging::config::LogConfigTest::testLockingRemoteLevel  )  throws Exception [inline]
 

void alma::acs::logging::config::LogConfigTest::testSubscriberNotification  )  throws LogConfigException [inline]
 

Tests adding and removing of subscribers, and whether LogConfig#initialize(boolean) triggers correctly the notification of these subscribers.


Member Data Documentation

LogConfig alma::acs::logging::config::LogConfigTest::logConfig [private]
 

Logger alma::acs::logging::config::LogConfigTest::logger [private]
 


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