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
FieldsModifier and TypeFieldDescriptionprotected org.apache.struts.config.ForwardConfigA 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.ActionConfigAn action mapping we'll use within tests.protected org.apache.struts.config.ForwardConfigThe common base we'll use.protected org.apache.struts.config.ModuleConfigThe ModuleConfig we'll use.protected org.apache.struts.config.ForwardConfigThe common subForward we'll use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetUp()Set up instance variables required by this test case.voidtearDown()Tear down instance variables required by this test case.voidTest checkCircularInheritance() for circular inheritance between a forward declared in an action and a global forward.voidTest checkCircularInheritance() for circular inheritance between a forward declared in an action and a global forward and both forwards have the same name.voidTest checkCircularInheritance() for circular inheritance between forwards in an action.voidTest checkCircularInheritance() for circular inheritance between forwards in an action.voidTest checkCircularInheritance() for circular inheritance between global forwards.voidTest checkCircularInheritance() for circular inheritance between global forwards.voidTest checkCircularInheritance() for when there is no circular inheritance.voidMake sure checkCircularInheritance() works as expected where there is no inheritance set up.voidTest processExtends() where an action ForwardConfig extends another ForwardConfig, which in turn extends a global ForwardConfig with the same name.voidTest processExtends() with a basic extension.voidTest processExtends() with a basic extension between an action config and a global config.voidMake sure processExtends() throws an error when the config is already configured.voidTest processExtends() with an incorrect setup where a global config attempts to extend an action config.voidTest processExtends() when nothing is extended.voidTest 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
-