Class TestDynaActionForm

java.lang.Object
org.apache.struts.action.TestDynaActionFormClass
org.apache.struts.action.TestDynaActionForm

public class TestDynaActionForm extends TestDynaActionFormClass
Suite of unit tests for the DynaActionForm class.
  • Field Details

    • properties

      protected static final String[] properties
      The set of property names we expect to have returned when calling getDynaProperties(). You should update this list when new properties are added to TestBean.
    • moduleConfig

      protected org.apache.struts.config.ModuleConfig moduleConfig
      Dummy ModuleConfig for calls to reset() and validate().
    • dynaForm

      protected org.apache.struts.action.DynaActionForm dynaForm
      The basic DynaActionForm to use for testing.
    • mapping

      protected org.apache.struts.action.ActionMapping mapping
      Dummy ActionMapping for calls to reset() and validate().
  • Constructor Details

    • TestDynaActionForm

      public TestDynaActionForm()
  • Method Details

    • setUp

      @BeforeEach public void setUp()
      Overrides:
      setUp in class TestDynaActionFormClass
    • tearDown

      @AfterEach public void tearDown()
      Overrides:
      tearDown in class TestDynaActionFormClass
    • testBeanCreate

      @Test public void testBeanCreate()
    • testIndexedInitialize

      @Test public void testIndexedInitialize()
    • testScalarInitialize

      @Test public void testScalarInitialize()
    • testGetDescriptorArguments

      @Test public void testGetDescriptorArguments()
      Corner cases on getDynaProperty invalid arguments.
    • testGetDescriptorBoolean

      @Test public void testGetDescriptorBoolean()
      Positive getDynaProperty on property booleanProperty.
    • testGetDescriptorDouble

      @Test public void testGetDescriptorDouble()
      Positive getDynaProperty on property doubleProperty.
    • testGetDescriptorFloat

      @Test public void testGetDescriptorFloat()
      Positive getDynaProperty on property floatProperty.
    • testGetDescriptorInt

      @Test public void testGetDescriptorInt()
      Positive getDynaProperty on property intProperty.
    • testGetDescriptorLong

      @Test public void testGetDescriptorLong()
      Positive getDynaProperty on property longProperty.
    • testGetDescriptorSecond

      @Test public void testGetDescriptorSecond()
      Positive getDynaProperty on property booleanSecond that uses an "is" method as the getter.
    • testGetDescriptorShort

      @Test public void testGetDescriptorShort()
      Positive getDynaProperty on property shortProperty.
    • testGetDescriptorString

      @Test public void testGetDescriptorString()
      Positive getDynaProperty on property stringProperty.
    • testGetDescriptors

      @Test public void testGetDescriptors()
      Positive test for getDynaPropertys(). Each property name listed in properties should be returned exactly once.
    • testGetIndexedArguments

      @Test public void testGetIndexedArguments()
      Corner cases on getIndexedProperty invalid arguments.
    • testGetIndexedValues

      @Test public void testGetIndexedValues()
      Positive and negative tests on getIndexedProperty valid arguments.
    • testGetMappedArguments

      @Test public void testGetMappedArguments()
      Corner cases on getMappedProperty invalid arguments.
    • testGetMappedValues

      @Test public void testGetMappedValues()
      Positive and negative tests on getMappedProperty valid arguments.
    • testGetSimpleArguments

      @Test public void testGetSimpleArguments()
      Corner cases on getSimpleProperty invalid arguments.
    • testGetSimpleBoolean

      @Test public void testGetSimpleBoolean()
      Test getSimpleProperty on a boolean property.
    • testGetSimpleDouble

      @Test public void testGetSimpleDouble()
      Test getSimpleProperty on a double property.
    • testGetSimpleFloat

      @Test public void testGetSimpleFloat()
      Test getSimpleProperty on a float property.
    • testGetSimpleInt

      @Test public void testGetSimpleInt()
      Test getSimpleProperty on a int property.
    • testGetSimpleLong

      @Test public void testGetSimpleLong()
      Test getSimpleProperty on a long property.
    • testGetSimpleShort

      @Test public void testGetSimpleShort()
      Test getSimpleProperty on a short property.
    • testGetSimpleString

      @Test public void testGetSimpleString()
      Test getSimpleProperty on a String property.
    • testMappedContains

      @Test public void testMappedContains()
      Test contains() method for mapped properties.
    • testMappedRemove

      @Test public void testMappedRemove()
      Test remove() method for mapped properties.
    • testResetGet

      @Test public void testResetGet()
      Test the reset method when the request method is GET.
    • testResetPost

      @Test public void testResetPost()
      Test the reset method when the request method is GET.
    • testSetIndexedArguments

      @Test public void testSetIndexedArguments()
      Corner cases on setIndexedProperty invalid arguments.
    • testSetIndexedValues

      @Test public void testSetIndexedValues()
      Positive and negative tests on setIndexedProperty valid arguments.
    • testSetMappedValues

      @Test public void testSetMappedValues()
      Positive and negative tests on setMappedProperty valid arguments.
    • testSetSimpleBoolean

      @Test public void testSetSimpleBoolean()
      Test setSimpleProperty on a boolean property.
    • testSetSimpleDouble

      @Test public void testSetSimpleDouble()
      Test setSimpleProperty on a double property.
    • testSetSimpleFloat

      @Test public void testSetSimpleFloat()
      Test setSimpleProperty on a float property.
    • testSetSimpleInt

      @Test public void testSetSimpleInt()
      Test setSimpleProperty on a int property.
    • testSetSimpleLong

      @Test public void testSetSimpleLong()
      Test setSimpleProperty on a long property.
    • testSetSimpleShort

      @Test public void testSetSimpleShort()
      Test setSimpleProperty on a short property.
    • testSetSimpleString

      @Test public void testSetSimpleString()
      Test setSimpleProperty on a String property.
    • testGetDescriptorBase

      public void testGetDescriptorBase(String name, Class<?> type)
      Base for testGetDescriptorXxxxx() series of tests.
      Parameters:
      name - Name of the property to be retrieved
      type - Expected class type of this property