Package org.apache.struts.config
Class TestForwardConfig
java.lang.Object
org.apache.struts.config.TestForwardConfig
Unit tests for
ForwardConfig
. Currently contains tests for
methods supporting configuration inheritance.- Version:
- $Rev$ $Date$
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.apache.struts.config.ForwardConfig
A ForwardConfig we'll use to test cases where a ForwardConfig declared for an action extends a ForwardConfig declared globally, with both ForwardConfigs using the same name.protected org.apache.struts.config.ActionConfig
An action mapping we'll use within tests.protected org.apache.struts.config.ForwardConfig
The common base we'll use.protected org.apache.struts.config.ModuleConfig
The ModuleConfig we'll use.protected org.apache.struts.config.ForwardConfig
The common subForward we'll use. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setUp()
Set up instance variables required by this test case.void
tearDown()
Tear down instance variables required by this test case.void
Test checkCircularInheritance() for circular inheritance between a forward declared in an action and a global forward.void
Test checkCircularInheritance() for circular inheritance between a forward declared in an action and a global forward and both forwards have the same name.void
Test checkCircularInheritance() for circular inheritance between forwards in an action.void
Test checkCircularInheritance() for circular inheritance between forwards in an action.void
Test checkCircularInheritance() for circular inheritance between global forwards.void
Test checkCircularInheritance() for circular inheritance between global forwards.void
Test checkCircularInheritance() for when there is no circular inheritance.void
Make sure checkCircularInheritance() works as expected where there is no inheritance set up.void
Test processExtends() where an action ForwardConfig extends another ForwardConfig, which in turn extends a global ForwardConfig with the same name.void
Test processExtends() with a basic extension.void
Test processExtends() with a basic extension between an action config and a global config.void
Make sure processExtends() throws an error when the config is already configured.void
Test processExtends() with an incorrect setup where a global config attempts to extend an action config.void
Test processExtends() when nothing is extended.void
Test processExtends() with an action config that extends a global config with the same name.
-
Field Details
-
moduleConfig
protected org.apache.struts.config.ModuleConfig moduleConfigThe ModuleConfig we'll use. -
baseConfig
protected org.apache.struts.config.ForwardConfig baseConfigThe common base we'll use. -
subConfig
protected org.apache.struts.config.ForwardConfig subConfigThe common subForward we'll use. -
actionBaseConfig
protected org.apache.struts.config.ForwardConfig actionBaseConfigA ForwardConfig we'll use to test cases where a ForwardConfig declared for an action extends a ForwardConfig declared globally, with both ForwardConfigs using the same name. -
actionConfig
protected org.apache.struts.config.ActionConfig actionConfigAn action mapping we'll use within tests.
-
-
Constructor Details
-
TestForwardConfig
public TestForwardConfig()
-
-
Method Details
-
setUp
Set up instance variables required by this test case. -
tearDown
Tear down instance variables required by this test case. -
testCheckCircularInheritanceNoExtends
Make sure checkCircularInheritance() works as expected where there is no inheritance set up. -
testCheckCircularInheritanceNoConflicts
Test checkCircularInheritance() for when there is no circular inheritance. -
testCheckCircularInheritanceBasicGlobal
Test checkCircularInheritance() for circular inheritance between global forwards. -
testCheckCircularInheritanceGlobal2Levels
Test checkCircularInheritance() for circular inheritance between global forwards. -
testCheckCircularInheritanceActionForwardsNoConflict
Test checkCircularInheritance() for circular inheritance between forwards in an action. -
testCheckCircularInheritanceActionForwardsBasic
Test checkCircularInheritance() for circular inheritance between forwards in an action. -
testCheckCircularInheritanceActionForwardExtendGlobal
Test checkCircularInheritance() for circular inheritance between a forward declared in an action and a global forward. -
testCheckCircularInheritanceActionForwardExtendGlobalSameName
Test checkCircularInheritance() for circular inheritance between a forward declared in an action and a global forward and both forwards have the same name. -
testProcessExtendsConfigured
Make sure processExtends() throws an error when the config is already configured. -
testProcessExtendsNoExtension
Test processExtends() when nothing is extended.- Throws:
Exception
-
testProcessExtendsBasicExtension
Test processExtends() with a basic extension.- Throws:
Exception
-
testProcessExtendsBasicGlobalExtension
Test processExtends() with a basic extension between an action config and a global config.- Throws:
Exception
-
testProcessExtendsGlobalExtendingAction
Test processExtends() with an incorrect setup where a global config attempts to extend an action config. -
testProcessExtendsSameNames
Test processExtends() with an action config that extends a global config with the same name.- Throws:
Exception
-
testProcessExtendsActionExtendsActionExtendsGlobalWithSameName
Test processExtends() where an action ForwardConfig extends another ForwardConfig, which in turn extends a global ForwardConfig with the same name.- Throws:
Exception
-