org.apache.struts.config
Class TestFormBeanConfig

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

public class TestFormBeanConfig
extends junit.framework.TestCase

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

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

Nested Class Summary
static class TestFormBeanConfig.CustomFormBeanConfig
          Used to detect that FormBeanConfig is making the right calls.
 
Field Summary
protected  FormBeanConfig baseForm
          The common base we'll use.
protected  ModuleConfig config
          The ModuleConfig we'll use.
 
Constructor Summary
TestFormBeanConfig(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 an error.
 void testCheckCircularInheritanceError()
          Basic check that SHOULD detect an error.
 void testInheritFrom()
          Test a typical form bean configuration extension where various properties should be inherited from a base form.
 void testProcessExtendsBaseFormExtends()
          Test that processExtends() makes sure that a base form's own extension has been processed.
 void testProcessExtendsMissingBaseForm()
          Make sure that correct exception is thrown if a base form 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.


baseForm

protected FormBeanConfig baseForm
The common base we'll use.

Constructor Detail

TestFormBeanConfig

public TestFormBeanConfig(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 an error.


testCheckCircularInheritanceError

public void testCheckCircularInheritanceError()
Basic check that SHOULD detect an error.


testProcessExtendsBaseFormExtends

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

Throws:
Exception

testProcessExtendsMissingBaseForm

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

Throws:
Exception

testInheritFrom

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

Throws:
Exception


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