|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.struts.action.TestActionServlet
public class TestActionServlet
Suite of unit tests for the org.apache.struts.action.ActionServlet
class.
Nested Class Summary | |
---|---|
static class |
TestActionServlet.CustomActionConfig
Used for testing custom ActionConfig classes. |
static class |
TestActionServlet.CustomExceptionConfig
Used for testing custom ExceptionConfig classes. |
static class |
TestActionServlet.CustomFormBeanConfig
Used for testing custom FormBeanConfig classes. |
static class |
TestActionServlet.CustomForwardConfig
Used for testing custom ForwardConfig classes. |
Field Summary | |
---|---|
protected ActionServlet |
actionServlet
The ActionServlet we'll test. |
protected ActionMapping |
baseAction
The common action config we'll use. |
protected ExceptionConfig |
baseException
The common exception config we'll use. |
protected FormBeanConfig |
baseFormBean
The common form bean we'll use. |
protected ActionForward |
baseForward
The common action forward we'll use. |
protected ModuleConfig |
moduleConfig
The ModuleConfig we'll use. |
Constructor Summary | |
---|---|
TestActionServlet(String theName)
Defines the testcase name for JUnit. |
Method Summary | |
---|---|
static void |
main(String[] theArgs)
Start the tests. |
void |
notestProcessActionConfigClassError()
Make sure the code throws the correct exception when it can't create an instance of the base config's custom class. |
void |
notestProcessExceptionConfigClassError()
Make sure the code throws the correct exception when it can't create an instance of the base config's custom class. |
void |
notestProcessFormBeanConfigClassError()
Make sure the code throws the correct exception when it can't create an instance of the base config's custom class. |
void |
notestProcessForwardConfigClassError()
Make sure the code throws the correct exception when it can't create an instance of the base config's custom class. |
void |
notestSplitAndResolvePaths()
Test class loader resolution and splitting. |
void |
setUp()
Set up instance variables required by this test case. |
static junit.framework.Test |
suite()
|
void |
tearDown()
Tear down instance variables required by this test case. |
void |
testInitDestroyInternal()
Verify that we can initialize and destroy our internal message resources object. |
void |
testInitModuleActionConfigsNoExtends()
Test that nothing fails if there are no extensions. |
void |
testInitModuleExceptionConfigsNoExtends()
Test that nothing fails if there are no extensions. |
void |
testInitModuleExceptionConfigsNullFormType()
Test that initModuleExceptionConfigs throws an exception when a handler with a null key is present. |
void |
testInitModuleFormBeansNoExtends()
Test that nothing fails if there are no extensions. |
void |
testInitModuleFormBeansNullFormType()
Test that initModuleFormBeans throws an exception when a form with a null type is present. |
void |
testInitModuleFormBeansNullPropType()
Test that initModuleFormBeans throws an exception when a form whose prop type is null is present. |
void |
testInitModuleForwardConfigsNoExtends()
Test that nothing fails if there are no extensions. |
void |
testInitModuleForwardsNullFormType()
Test that initModuleForwards throws an exception when a forward with a null path is present. |
void |
testProcessActionConfigClass()
Make sure processActionConfigClass() returns an instance of the correct class if the base config is using a custom class. |
void |
testProcessActionConfigClassNoExtends()
Make sure processActionConfigClass() returns what it was given if the action passed to it doesn't extend anything. |
void |
testProcessActionConfigClassOverriddenSubConfigClass()
Test the case where the subconfig has already specified its own config class. |
void |
testProcessActionConfigClassSubConfigCustomClass()
Make sure processActionConfigClass() returns the same class instance if the base config isn't using a custom class. |
void |
testProcessActionExtension()
Test that processActionConfigExtension() calls processExtends() |
void |
testProcessActionExtensionWithExceptionConfig()
Test that an ActionConfig's ExceptionConfig can inherit from a global ExceptionConfig. |
void |
testProcessActionExtensionWithForwardConfig()
Test that an ActionConfig's ForwardConfig can inherit from a global ForwardConfig. |
void |
testProcessExceptionConfigClass()
Make sure processExceptionConfigClass() returns an instance of the correct class if the base config is using a custom class. |
void |
testProcessExceptionConfigClassNoExtends()
Make sure processExceptionConfigClass() returns what it was given if the handler passed to it doesn't extend anything. |
void |
testProcessExceptionConfigClassOverriddenSubFormClass()
Test the case where the subconfig has already specified its own config class. |
void |
testProcessExceptionConfigClassSubConfigCustomClass()
Make sure processExceptionConfigClass() returns the same class instance if the base config isn't using a custom class. |
void |
testProcessExceptionExtension()
Test that processExceptionExtension() calls processExtends() |
void |
testProcessFormBeanConfigClass()
Make sure processFormBeanConfigClass() returns an instance of the correct class if the base config is using a custom class. |
void |
testProcessFormBeanConfigClassNoExtends()
Make sure processFormBeanConfigClass() returns what it was given if the form passed to it doesn't extend anything. |
void |
testProcessFormBeanConfigClassOverriddenSubFormClass()
Test the case where the subform has already specified its own form bean config class. |
void |
testProcessFormBeanConfigClassSubFormCustomClass()
Make sure processFormBeanConfigClass() returns the same class instance if the base config isn't using a custom class. |
void |
testProcessFormBeanExtension()
Test that processFormBeanExtension() calls processExtends() |
void |
testProcessForwardConfigClass()
Make sure processForwardConfigClass() returns an instance of the correct class if the base config is using a custom class. |
void |
testProcessForwardConfigClassNoExtends()
Make sure processForwardConfigClass() returns what it was given if the forward passed to it doesn't extend anything. |
void |
testProcessForwardConfigClassOverriddenSubConfigClass()
Test the case where the subconfig has already specified its own config class. |
void |
testProcessForwardConfigClassSubConfigCustomClass()
Make sure processForwardConfigClass() returns the same class instance if the base config isn't using a custom class. |
void |
testProcessForwardExtension()
Test that processForwardExtension() calls processExtends() |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, 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, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ModuleConfig moduleConfig
protected FormBeanConfig baseFormBean
protected ExceptionConfig baseException
protected ActionMapping baseAction
protected ActionForward baseForward
protected ActionServlet actionServlet
Constructor Detail |
---|
public TestActionServlet(String theName)
theName
- the testcase's name.Method Detail |
---|
public static void main(String[] theArgs)
theArgs
- the arguments. Not usedpublic static junit.framework.Test suite()
TestSuite
) that includes all methods
starting with "test"public void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
public void tearDown()
tearDown
in class junit.framework.TestCase
public void testInitDestroyInternal()
public void notestSplitAndResolvePaths() throws Exception
Exception
public void testInitModuleFormBeansNoExtends() throws javax.servlet.ServletException
javax.servlet.ServletException
public void testInitModuleFormBeansNullFormType() throws javax.servlet.ServletException
javax.servlet.ServletException
public void testInitModuleFormBeansNullPropType() throws javax.servlet.ServletException
javax.servlet.ServletException
public void testProcessFormBeanExtension() throws javax.servlet.ServletException
javax.servlet.ServletException
public void testProcessFormBeanConfigClass() throws Exception
Exception
public void testProcessFormBeanConfigClassNoExtends() throws Exception
Exception
public void testProcessFormBeanConfigClassSubFormCustomClass() throws Exception
Exception
public void notestProcessFormBeanConfigClassError() throws Exception
Exception
public void testProcessFormBeanConfigClassOverriddenSubFormClass() throws Exception
Exception
public void testInitModuleExceptionConfigsNoExtends() throws javax.servlet.ServletException
javax.servlet.ServletException
public void testInitModuleExceptionConfigsNullFormType() throws javax.servlet.ServletException
javax.servlet.ServletException
public void testProcessExceptionExtension() throws javax.servlet.ServletException
javax.servlet.ServletException
public void testProcessExceptionConfigClass() throws Exception
Exception
public void testProcessExceptionConfigClassNoExtends() throws Exception
Exception
public void testProcessExceptionConfigClassSubConfigCustomClass() throws Exception
Exception
public void notestProcessExceptionConfigClassError() throws Exception
Exception
public void testProcessExceptionConfigClassOverriddenSubFormClass() throws Exception
Exception
public void testInitModuleForwardConfigsNoExtends() throws javax.servlet.ServletException
javax.servlet.ServletException
public void testInitModuleForwardsNullFormType() throws javax.servlet.ServletException
javax.servlet.ServletException
public void testProcessForwardExtension() throws javax.servlet.ServletException
javax.servlet.ServletException
public void testProcessForwardConfigClass() throws Exception
Exception
public void testProcessForwardConfigClassNoExtends() throws Exception
Exception
public void testProcessForwardConfigClassSubConfigCustomClass() throws Exception
Exception
public void notestProcessForwardConfigClassError() throws Exception
Exception
public void testProcessForwardConfigClassOverriddenSubConfigClass() throws Exception
Exception
public void testInitModuleActionConfigsNoExtends() throws javax.servlet.ServletException
javax.servlet.ServletException
public void testProcessActionExtension() throws javax.servlet.ServletException
javax.servlet.ServletException
public void testProcessActionExtensionWithForwardConfig() throws javax.servlet.ServletException
javax.servlet.ServletException
public void testProcessActionExtensionWithExceptionConfig() throws javax.servlet.ServletException
javax.servlet.ServletException
public void testProcessActionConfigClass() throws Exception
Exception
public void testProcessActionConfigClassNoExtends() throws Exception
Exception
public void testProcessActionConfigClassSubConfigCustomClass() throws Exception
Exception
public void notestProcessActionConfigClassError() throws Exception
Exception
public void testProcessActionConfigClassOverriddenSubConfigClass() throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |