org.apache.commons.beanutils
Class TestBean

java.lang.Object
  extended by org.apache.commons.beanutils.TestBean
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TestBeanPublicSubclass

public class TestBean
extends Object
implements Serializable

General purpose test bean for JUnit tests for the "beanutils" component.

Version:
$Revision: 687190 $ $Date: 2008-08-19 23:51:19 +0100 (Tue, 19 Aug 2008) $
Author:
Craig R. McClanahan, Rodney Waldhoff
See Also:
Serialized Form

Nested Class Summary
 class TestBean.MappedTestBean
           
 
Constructor Summary
  TestBean()
           
  TestBean(boolean booleanProperty)
           
  TestBean(Boolean booleanSecond)
           
protected TestBean(boolean booleanProperty, boolean booleanSecond, String stringProperty)
           
  TestBean(boolean booleanProperty, String stringProperty)
           
  TestBean(Boolean booleanSecond, String stringProperty)
           
  TestBean(double doubleProperty)
           
  TestBean(float floatProperty)
           
  TestBean(float floatProperty, String stringProperty)
           
  TestBean(Integer intProperty)
           
  TestBean(List listIndexed)
           
  TestBean(String stringProperty)
           
  TestBean(String[][] string2dArray)
           
 
Method Summary
static int currentCounter()
          Return the current value of the counter.
 TestBean getAnotherNested()
           
 boolean getBooleanProperty()
           
 byte getByteProperty()
           
 Date[] getDateArrayProperty()
           
 Date getDateProperty()
           
 double getDoubleProperty()
           
 String[] getDupProperty()
           
 String getDupProperty(int index)
           
 float getFloatProperty()
           
 int[] getIntArray()
           
 int getIntIndexed(int index)
           
 int getIntProperty()
           
 boolean getInvalidBoolean()
           
 List getListIndexed()
           
 long getLongProperty()
           
 int getMappedIntProperty(String key)
           
 TestBean.MappedTestBean getMappedNested()
           
 Object getMappedObjects(String key)
           
 String getMappedProperty(String key)
           
 Map getMapProperty()
           
 TestBean getNested()
           
 DynaBean getNestedDynaBean()
           
 String getNullProperty()
           
 String getReadOnlyProperty()
           
 short getShortProperty()
           
 String[] getString2dArray(int index)
           
 String[] getStringArray()
           
 String getStringIndexed(int index)
           
 String getStringProperty()
           
 String getWriteOnlyPropertyValue()
           
static void incrementCounter()
          Increment the current value of the counter by 1.
static void incrementCounter(int amount)
          Increment the current value of the counter by the specified amount.
static void incrementCounter(Number amount)
          Increments the current value of the count by the specified amount * 2.
 boolean isBooleanSecond()
           
 boolean isInvalidBoolean()
           
 void setAnotherNested(TestBean anotherNested)
           
 void setBooleanProperty(boolean booleanProperty)
           
 void setBooleanSecond(boolean booleanSecond)
           
 void setByteProperty(byte byteProperty)
           
 void setDateArrayProperty(Date[] dateArrayProperty)
           
 void setDateProperty(Date dateProperty)
           
 void setDoubleProperty(double doubleProperty)
           
 void setDupProperty(int index, String value)
           
 void setDupProperty(String[] dupProperty)
           
 void setFloatProperty(float floatProperty)
           
 void setIntArray(int[] intArray)
           
 void setIntIndexed(int index, int value)
           
 void setIntProperty(int intProperty)
           
 void setInvalidBoolean(String invalidBoolean)
           
 void setLongProperty(long longProperty)
           
 void setMappedIntProperty(String key, int value)
           
 void setMappedObjects(String key, Object value)
           
 void setMappedProperty(String key, String value)
           
 void setMapProperty(Map mapProperty)
           
 void setNestedDynaBean(DynaBean nestedDynaBean)
           
 void setNullProperty(String nullProperty)
           
 void setShortProperty(short shortProperty)
           
 void setStringArray(String[] stringArray)
           
 void setStringIndexed(int index, String value)
           
 void setStringProperty(String stringProperty)
           
 void setWriteOnlyProperty(String writeOnlyProperty)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestBean

public TestBean()

TestBean

public TestBean(String stringProperty)

TestBean

public TestBean(float floatProperty)

TestBean

public TestBean(boolean booleanProperty)

TestBean

public TestBean(Boolean booleanSecond)

TestBean

public TestBean(float floatProperty,
                String stringProperty)

TestBean

public TestBean(boolean booleanProperty,
                String stringProperty)

TestBean

public TestBean(Boolean booleanSecond,
                String stringProperty)

TestBean

public TestBean(Integer intProperty)

TestBean

public TestBean(double doubleProperty)

TestBean

protected TestBean(boolean booleanProperty,
                   boolean booleanSecond,
                   String stringProperty)

TestBean

public TestBean(List listIndexed)

TestBean

public TestBean(String[][] string2dArray)
Method Detail

getBooleanProperty

public boolean getBooleanProperty()

setBooleanProperty

public void setBooleanProperty(boolean booleanProperty)

isBooleanSecond

public boolean isBooleanSecond()

setBooleanSecond

public void setBooleanSecond(boolean booleanSecond)

getByteProperty

public byte getByteProperty()

setByteProperty

public void setByteProperty(byte byteProperty)

getDateProperty

public Date getDateProperty()

setDateProperty

public void setDateProperty(Date dateProperty)

getDateArrayProperty

public Date[] getDateArrayProperty()

setDateArrayProperty

public void setDateArrayProperty(Date[] dateArrayProperty)

getDoubleProperty

public double getDoubleProperty()

setDoubleProperty

public void setDoubleProperty(double doubleProperty)

getDupProperty

public String[] getDupProperty()

getDupProperty

public String getDupProperty(int index)

setDupProperty

public void setDupProperty(int index,
                           String value)

setDupProperty

public void setDupProperty(String[] dupProperty)

getFloatProperty

public float getFloatProperty()

setFloatProperty

public void setFloatProperty(float floatProperty)

getIntArray

public int[] getIntArray()

setIntArray

public void setIntArray(int[] intArray)

getIntIndexed

public int getIntIndexed(int index)

setIntIndexed

public void setIntIndexed(int index,
                          int value)

getIntProperty

public int getIntProperty()

setIntProperty

public void setIntProperty(int intProperty)

getListIndexed

public List getListIndexed()

getLongProperty

public long getLongProperty()

setLongProperty

public void setLongProperty(long longProperty)

getMapProperty

public Map getMapProperty()

setMapProperty

public void setMapProperty(Map mapProperty)

getMappedObjects

public Object getMappedObjects(String key)

setMappedObjects

public void setMappedObjects(String key,
                             Object value)

getMappedProperty

public String getMappedProperty(String key)

setMappedProperty

public void setMappedProperty(String key,
                              String value)

getMappedIntProperty

public int getMappedIntProperty(String key)

setMappedIntProperty

public void setMappedIntProperty(String key,
                                 int value)

getNested

public TestBean getNested()

getAnotherNested

public TestBean getAnotherNested()

setAnotherNested

public void setAnotherNested(TestBean anotherNested)

getNestedDynaBean

public DynaBean getNestedDynaBean()

setNestedDynaBean

public void setNestedDynaBean(DynaBean nestedDynaBean)

getMappedNested

public TestBean.MappedTestBean getMappedNested()

getNullProperty

public String getNullProperty()

setNullProperty

public void setNullProperty(String nullProperty)

getReadOnlyProperty

public String getReadOnlyProperty()

getShortProperty

public short getShortProperty()

setShortProperty

public void setShortProperty(short shortProperty)

getStringArray

public String[] getStringArray()

setStringArray

public void setStringArray(String[] stringArray)

getStringIndexed

public String getStringIndexed(int index)

setStringIndexed

public void setStringIndexed(int index,
                             String value)

getString2dArray

public String[] getString2dArray(int index)

getStringProperty

public String getStringProperty()

setStringProperty

public void setStringProperty(String stringProperty)

getWriteOnlyPropertyValue

public String getWriteOnlyPropertyValue()

setWriteOnlyProperty

public void setWriteOnlyProperty(String writeOnlyProperty)

getInvalidBoolean

public boolean getInvalidBoolean()

isInvalidBoolean

public boolean isInvalidBoolean()

setInvalidBoolean

public void setInvalidBoolean(String invalidBoolean)

currentCounter

public static int currentCounter()
Return the current value of the counter.


incrementCounter

public static void incrementCounter()
Increment the current value of the counter by 1.


incrementCounter

public static void incrementCounter(int amount)
Increment the current value of the counter by the specified amount.

Parameters:
amount - Amount to be added to the current counter

incrementCounter

public static void incrementCounter(Number amount)
Increments the current value of the count by the specified amount * 2. It has the same name as the method above so as to test the looseness of getMethod.



Copyright © 2000-2010 The Apache Software Foundation. All Rights Reserved.