com.ail.insurancetest
Class TestSubrogation

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

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

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

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

Constructor Summary
TestSubrogation(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()
          Method demanded by the CoreUser interface.
 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.
static junit.framework.Test suite()
           
 void testGoodInvocation()
          Ensure that MakeARecovery responds correctly to a set to correct parameters.
 void testInvokeMakeARecoveryBadArgs()
          Ensure that the MakeARecoveryEntryPoint handles bad arguments correctly.
 
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

TestSubrogation

public TestSubrogation(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)
                 throws java.lang.Exception
Throws:
java.lang.Exception

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()
Method demanded by the CoreUser interface.

Specified by:
getSecurityPrincipal in interface CoreUser
Returns:
Caller's security principal - may be null.

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

resetConfiguration

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

Specified by:
resetConfiguration in interface ConfigurationOwner

testInvokeMakeARecoveryBadArgs

public void testInvokeMakeARecoveryBadArgs()
Ensure that the MakeARecoveryEntryPoint handles bad arguments correctly.
  1. Invoke the entry point with no arguments set.
  2. Fail if any exception other than PreconditionException is thrown, or if no exception is thrown.
  3. Invoke the entry point with only the claim are set.
  4. Fail if any exception other than PreconditionException is thrown, or if no exception is thrown.


testGoodInvocation

public void testGoodInvocation()
Ensure that MakeARecovery responds correctly to a set to correct parameters.