|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
com.ail.coretest.TestCoreFactory
public class TestCoreFactory
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.
| Constructor Summary | |
|---|---|
TestCoreFactory()
|
|
TestCoreFactory(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 |
testBeanShellFactory()
The BeanShellFactory provides support for types to be created by scripts embedded in the systems configuration. |
void |
testBeanShellFactoryCoreRef()
The BeanShellFactory supports the notion of a type creation script that referrs to the 'core' - i.e. |
void |
testBeanShellFactoryExtends()
The BeanShellFactory provides support for creating types from a BeanShell script. |
void |
testBeanShellFactoryUrlLoader()
The BeanShell factory supports two type definition mechanisms. |
void |
testCastorXMLFactory()
The CastorXMLFactory provides support for types to be created via embedded XML in the system configuration. |
void |
testCastorXMLFactoryUrlLoader()
The Castor XML factory supports two type definition mechanisms. |
void |
testDoubleVersionPrototypeType()
Configuration history should maintain types by date. |
void |
testFactoryClone()
Test to check that modifications to an object cloned in the factory do no propogate to other instances of the same type. |
void |
testFactoryCloneOnTransientProperties()
The Factory's clone method should null transient properties - to avoid the situation when all instances of the same type end up sharing one object. |
void |
testFactorySingleInstance()
|
void |
testSimplePrototypeType()
Check that the type factory creates 'prototyped' types correctly. |
void |
testSimpleType()
Check that the type factory returns instances of a type as configured. |
void |
testUndefinedSimpleType()
Check that the type factory correctly handles a request for a type that is not defined. |
void |
testXSLTFactoryWithExtends()
The XSLTFactory provides support for creating types from an XSLT. |
void |
testXSLTFactoryWithoutExtends()
The CastorXMLFactory provides support for types to be created via embedded XML in the system configuration. |
| 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 |
|---|
public TestCoreFactory()
public TestCoreFactory(java.lang.String name)
| Method Detail |
|---|
public static junit.framework.Test suite()
public static void main(java.lang.String[] args)
public java.security.Principal getSecurityPrincipal()
getSecurityPrincipal in interface CoreUserpublic VersionEffectiveDate getVersionEffectiveDate()
getVersionEffectiveDate in interface CoreUserpublic void setConfiguration(Configuration config)
setConfiguration in interface ConfigurationOwnerconfig - Configuration to use from now on.public Configuration getConfiguration()
getConfiguration in interface ConfigurationOwnerpublic java.lang.String getConfigurationNamespace()
getConfigurationNamespace in interface CoreUserpublic void setConfigurationNamespace(java.lang.String configurationNamespace)
public void resetConfiguration()
resetConfiguration in interface ConfigurationOwnerpublic void testSimpleType()
createConfigurationOne
defines a type 'Version' to be an instance of com.ail.core.Version.
This test ensures that an instance of com.ail.core.Version is returned
when 'Version' is requested.
com.ail.core.Version
public void testUndefinedSimpleType()
public void testSimplePrototypeType()
public void testDoubleVersionPrototypeType()
TestCoreFactory defines two configurations, both define a type called SetVersion, both define SetVersion with different initial settings. This test saves both configurations in different effective dates, then by shifting the effective date between the two settings we should get the two different SetVersions back from the factory.
public void testBeanShellFactory()
throws java.lang.Exception
The configuration used in this test defines two BeanShell scripted types, one (BeanShellVersion) should create a version object with author and version attributes set, the other (BadBeanShellVersion) contains a syntax error which should cause a FactoryConfigurationError.
java.lang.Exception
public void testBeanShellFactoryCoreRef()
throws java.lang.Exception
java.lang.Exception
public void testCastorXMLFactory()
throws java.lang.Exception
java.lang.Exception
public void testXSLTFactoryWithExtends()
throws java.lang.Exception
java.lang.Exception
public void testXSLTFactoryWithoutExtends()
throws java.lang.Exception
java.lang.Exception
public void testBeanShellFactoryExtends()
throws java.lang.Exception
java.lang.Exception
public void testFactoryClone()
throws java.lang.Exception
java.lang.Exception
public void testFactorySingleInstance()
throws java.lang.Exception
java.lang.Exception
public void testFactoryCloneOnTransientProperties()
throws java.lang.Exception
java.lang.Exception
public void testCastorXMLFactoryUrlLoader()
throws java.lang.Exception
java.lang.Exception
public void testBeanShellFactoryUrlLoader()
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||