|
||||||||||
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.TestDynaActionFormClass
org.apache.struts.action.TestDynaActionForm
public class TestDynaActionForm
Suite of unit tests for the org.apache.struts.action.DynaActionForm
class.
Field Summary | |
---|---|
protected DynaActionForm |
dynaForm
The basic DynaActionForm to use for testing. |
protected Log |
log
|
protected ActionMapping |
mapping
Dummy ActionMapping for calls to reset() and validate(). |
protected ModuleConfig |
moduleConfig
Dummy ModuleConfig for calls to reset() and validate(). |
protected static String[] |
properties
The set of property names we expect to have returned when calling getDynaProperties() . |
Fields inherited from class org.apache.struts.action.TestDynaActionFormClass |
---|
beanConfig, dynaClass, dynaProperties |
Constructor Summary | |
---|---|
TestDynaActionForm(String theName)
Defines the testcase name for JUnit. |
Method Summary | |
---|---|
static void |
main(String[] theArgs)
Start the tests. |
void |
setUp()
|
protected void |
setupComplexProperties()
Set up the complex properties that cannot be configured from the initial value expression. |
static junit.framework.Test |
suite()
|
void |
tearDown()
|
void |
testBeanCreate()
|
void |
testGetDescriptorArguments()
Corner cases on getDynaProperty invalid arguments. |
protected void |
testGetDescriptorBase(String name,
Class type)
Base for testGetDescriptorXxxxx() series of tests. |
void |
testGetDescriptorBoolean()
Positive getDynaProperty on property booleanProperty . |
void |
testGetDescriptorDouble()
Positive getDynaProperty on property doubleProperty . |
void |
testGetDescriptorFloat()
Positive getDynaProperty on property floatProperty . |
void |
testGetDescriptorInt()
Positive getDynaProperty on property intProperty . |
void |
testGetDescriptorLong()
Positive getDynaProperty on property longProperty . |
void |
testGetDescriptors()
Positive test for getDynaPropertys(). |
void |
testGetDescriptorSecond()
Positive getDynaProperty on property booleanSecond that
uses an "is" method as the getter. |
void |
testGetDescriptorShort()
Positive getDynaProperty on property shortProperty . |
void |
testGetDescriptorString()
Positive getDynaProperty on property stringProperty . |
void |
testGetIndexedArguments()
Corner cases on getIndexedProperty invalid arguments. |
void |
testGetIndexedValues()
Positive and negative tests on getIndexedProperty valid arguments. |
void |
testGetMappedArguments()
Corner cases on getMappedProperty invalid arguments. |
void |
testGetMappedValues()
Positive and negative tests on getMappedProperty valid arguments. |
void |
testGetSimpleArguments()
Corner cases on getSimpleProperty invalid arguments. |
void |
testGetSimpleBoolean()
Test getSimpleProperty on a boolean property. |
void |
testGetSimpleDouble()
Test getSimpleProperty on a double property. |
void |
testGetSimpleFloat()
Test getSimpleProperty on a float property. |
void |
testGetSimpleInt()
Test getSimpleProperty on a int property. |
void |
testGetSimpleLong()
Test getSimpleProperty on a long property. |
void |
testGetSimpleShort()
Test getSimpleProperty on a short property. |
void |
testGetSimpleString()
Test getSimpleProperty on a String property. |
void |
testIndexedInitialize()
|
void |
testMappedContains()
Test contains() method for mapped properties. |
void |
testMappedRemove()
Test remove() method for mapped properties. |
void |
testResetGet()
Test the reset method when the request method is GET. |
void |
testResetPost()
Test the reset method when the request method is GET. |
void |
testScalarInitialize()
|
void |
testSetIndexedArguments()
Corner cases on setIndexedProperty invalid arguments. |
void |
testSetIndexedValues()
Positive and negative tests on setIndexedProperty valid arguments. |
void |
testSetMappedValues()
Positive and negative tests on setMappedProperty valid arguments. |
void |
testSetSimpleBoolean()
Test setSimpleProperty on a boolean property. |
void |
testSetSimpleDouble()
Test setSimpleProperty on a double property. |
void |
testSetSimpleFloat()
Test setSimpleProperty on a float property. |
void |
testSetSimpleInt()
Test setSimpleProperty on a int property. |
void |
testSetSimpleLong()
Test setSimpleProperty on a long property. |
void |
testSetSimpleShort()
Test setSimpleProperty on a short property. |
void |
testSetSimpleString()
Test setSimpleProperty on a String property. |
Methods inherited from class org.apache.struts.action.TestDynaActionFormClass |
---|
testClassCreate, testConfigAdd, testConfigCreate, testConfigDuplicate, testConfigInitialValues, testConfigProperties, testConfigRemove |
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 static final String[] properties
getDynaProperties()
. You should update this list when new
properties are added to TestBean.
protected ModuleConfig moduleConfig
protected DynaActionForm dynaForm
DynaActionForm
to use for testing.
protected ActionMapping mapping
protected Log log
Constructor Detail |
---|
public TestDynaActionForm(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()
setUp
in class TestDynaActionFormClass
public void tearDown()
tearDown
in class TestDynaActionFormClass
public void testBeanCreate()
public void testIndexedInitialize()
public void testScalarInitialize()
public void testGetDescriptorArguments()
public void testGetDescriptorBoolean()
booleanProperty
.
public void testGetDescriptorDouble()
doubleProperty
.
public void testGetDescriptorFloat()
floatProperty
.
public void testGetDescriptorInt()
intProperty
.
public void testGetDescriptorLong()
longProperty
.
public void testGetDescriptorSecond()
booleanSecond
that
uses an "is" method as the getter.
public void testGetDescriptorShort()
shortProperty
.
public void testGetDescriptorString()
stringProperty
.
public void testGetDescriptors()
properties
should be returned exactly once.
public void testGetIndexedArguments()
public void testGetIndexedValues()
public void testGetMappedArguments()
public void testGetMappedValues()
public void testGetSimpleArguments()
public void testGetSimpleBoolean()
public void testGetSimpleDouble()
public void testGetSimpleFloat()
public void testGetSimpleInt()
public void testGetSimpleLong()
public void testGetSimpleShort()
public void testGetSimpleString()
public void testMappedContains()
contains()
method for mapped properties.
public void testMappedRemove()
remove()
method for mapped properties.
public void testResetGet()
public void testResetPost()
public void testSetIndexedArguments()
public void testSetIndexedValues()
public void testSetMappedValues()
public void testSetSimpleBoolean()
public void testSetSimpleDouble()
public void testSetSimpleFloat()
public void testSetSimpleInt()
public void testSetSimpleLong()
public void testSetSimpleShort()
public void testSetSimpleString()
protected void setupComplexProperties()
protected void testGetDescriptorBase(String name, Class type)
name
- Name of the property to be retrievedtype
- Expected class type of this property
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |