org.apache.struts.config
Class TestActionConfig

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.struts.config.TestActionConfig
All Implemented Interfaces:
junit.framework.Test

public class TestActionConfig
extends junit.framework.TestCase

Unit tests for the org.apache.struts.config.ActionConfig class. Currently only contains code to test the methods that support configuration inheritance.

Version:
$Rev: 480593 $ $Date: 2005-05-25 19:35:00 -0400 (Wed, 25 May 2005) $

Nested Class Summary
static class TestActionConfig.CustomActionConfig
          Used to detect that ActionConfig is making the right calls.
 
Field Summary
protected  ActionConfig baseConfig
          The common base we'll use.
protected  ModuleConfig config
          The ModuleConfig we'll use.
 
Constructor Summary
TestActionConfig(String name)
          Construct a new instance of this test case.
 
Method Summary
 void setUp()
          Set up instance variables required by this test case.
static junit.framework.Test suite()
          Return the tests included in this test suite.
 void tearDown()
          Tear down instance variables required by this test case.
 void testCheckCircularInheritance()
          Basic check that shouldn't detect circular inheritance.
 void testCheckCircularInheritanceError()
          Basic check that should detect circular inheritance.
 void testInheritBoolean()
          Make sure that correct exception is thrown if a base action can't be found.
 void testInheritFrom()
          Test a typical form bean configuration extension where various forwards and exception handlers should be inherited from a base form.
 void testProcessExtendsActionExtends()
          Test that processExtends() makes sure that a base action's own extension has been processed.
 void testProcessExtendsMissingAction()
          Make sure that correct exception is thrown if a base action can't be found.
 
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

config

protected ModuleConfig config
The ModuleConfig we'll use.


baseConfig

protected ActionConfig baseConfig
The common base we'll use.

Constructor Detail

TestActionConfig

public TestActionConfig(String name)
Construct a new instance of this test case.

Parameters:
name - Name of the test case
Method Detail

setUp

public void setUp()
Set up instance variables required by this test case.

Overrides:
setUp in class junit.framework.TestCase

suite

public static junit.framework.Test suite()
Return the tests included in this test suite.


tearDown

public void tearDown()
Tear down instance variables required by this test case.

Overrides:
tearDown in class junit.framework.TestCase

testCheckCircularInheritance

public void testCheckCircularInheritance()
Basic check that shouldn't detect circular inheritance.


testCheckCircularInheritanceError

public void testCheckCircularInheritanceError()
Basic check that should detect circular inheritance.


testProcessExtendsActionExtends

public void testProcessExtendsActionExtends()
                                     throws Exception
Test that processExtends() makes sure that a base action's own extension has been processed.

Throws:
Exception

testProcessExtendsMissingAction

public void testProcessExtendsMissingAction()
                                     throws Exception
Make sure that correct exception is thrown if a base action can't be found.

Throws:
Exception

testInheritFrom

public void testInheritFrom()
                     throws Exception
Test a typical form bean configuration extension where various forwards and exception handlers should be inherited from a base form. This method checks all the subelements.

Throws:
Exception

testInheritBoolean

public void testInheritBoolean()
                        throws Exception
Make sure that correct exception is thrown if a base action can't be found.

Throws:
Exception


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.