com.ail.coretest
Class TestCoreLogging

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.ail.coretest.TestCoreLogging
All Implemented Interfaces:
ConfigurationOwner, CoreUser, java.io.Serializable, junit.framework.Test

public class TestCoreLogging
extends junit.framework.TestCase
implements CoreUser, ConfigurationOwner

The tests defined here exercise the Core system's factory. They use the Core class as a Service or core client would. Note: These tests assume that the JDBCConfigurationLoader is being used.

Version:
$Revision: 1.4 $
See Also:
Serialized Form

Constructor Summary
TestCoreLogging(java.lang.String name)
          Constructs a test case with the given name.
 
Method Summary
 Configuration getConfiguration()
          Method demanded by the ConfigurationOwner interface.
 java.lang.String getConfigurationNamespace()
          Method demanded by the ConfigurationOwner interface.
 java.security.Principal getSecurityPrincipal()
          Get the security principal associated with this instance.
 VersionEffectiveDate getVersionEffectiveDate()
          Method demanded by the CoreUser interface.
static void main(java.lang.String[] args)
           
 void resetConfiguration()
          Method demanded by the ConfigurationOwner interface.
 void setConfiguration(Configuration config)
          Method demanded by the ConfigurationOwner interface.
 void setConfigurationNamespace(java.lang.String configurationNamespace)
           
static junit.framework.Test suite()
           
 void testInfoLog()
          Check that messages can be written to the info log.
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestCoreLogging

public TestCoreLogging(java.lang.String name)
Constructs a test case with the given name.

Method Detail

suite

public static junit.framework.Test suite()

main

public static void main(java.lang.String[] args)

getVersionEffectiveDate

public VersionEffectiveDate getVersionEffectiveDate()
Method demanded by the CoreUser interface.

Specified by:
getVersionEffectiveDate in interface CoreUser
Returns:
A date to use to selecte the corrent version of config info.

getSecurityPrincipal

public java.security.Principal getSecurityPrincipal()
Get the security principal associated with this instance.

Specified by:
getSecurityPrincipal in interface CoreUser
Returns:
The associated security principal - if defined, null otherwise.

setConfiguration

public void setConfiguration(Configuration config)
Method demanded by the ConfigurationOwner interface.

Specified by:
setConfiguration in interface ConfigurationOwner
Parameters:
config - Configuration to use from now on.

getConfiguration

public Configuration getConfiguration()
Method demanded by the ConfigurationOwner interface.

Specified by:
getConfiguration in interface ConfigurationOwner
Returns:
The current configuration (at versionEffectiveDate).

getConfigurationNamespace

public java.lang.String getConfigurationNamespace()
Method demanded by the ConfigurationOwner interface.

Specified by:
getConfigurationNamespace in interface CoreUser
Returns:
The configuration namespace we're using

setConfigurationNamespace

public void setConfigurationNamespace(java.lang.String configurationNamespace)

resetConfiguration

public void resetConfiguration()
Method demanded by the ConfigurationOwner interface.

Specified by:
resetConfiguration in interface ConfigurationOwner

testInfoLog

public void testInfoLog()
                 throws java.lang.Exception
Check that messages can be written to the info log.
  1. Write a message to the log.
  2. File if any exceptions or errors are thrown.

Throws:
java.lang.Exception