|
Keel 2.1RC2 | ||||||||||
| 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.commons.beanutils.PropertyUtilsTestCase
Test Case for the PropertyUtils class. The majority of these tests use instances of the TestBean class, so be sure to update the tests if you change the characteristics of that class.
So far, this test case has tests for the following methods of the PropertyUtils class:
| Field Summary | |
protected TestBean |
beanThe basic test bean for each test. |
protected TestBeanPackageSubclass |
beanPackageSubclassThe "package private subclass" test bean for each test. |
protected PrivateDirect |
beanPrivateThe test bean for private access tests. |
protected PrivateDirect |
beanPrivateSubclassThe test bean for private access tests of subclasses. |
protected TestBeanPublicSubclass |
beanPublicSubclassThe "public subclass" test bean for each test. |
protected java.lang.String[] |
describesThe set of properties that should be described. |
private static java.lang.String |
PRIVATE_DIRECT_CLASSThe fully qualified class name of our private directly implemented interface. |
private static java.lang.String |
PRIVATE_INDIRECT_CLASSThe fully qualified class name of our private indirectly implemented interface. |
protected static java.lang.String[] |
propertiesThe set of property names we expect to have returned when calling getPropertyDescriptors(). |
private static java.lang.String |
TEST_BEAN_CLASSThe fully qualified class name of our test bean class. |
| Fields inherited from class junit.framework.TestCase |
|
| Constructor Summary | |
PropertyUtilsTestCase(java.lang.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 |
testCopyPropertiesMap()Test copyProperties() when the origin is a a Map. |
void |
testDescribe()Test the describe() method. |
void |
testGetDescriptorArguments()Corner cases on getPropertyDescriptor invalid arguments. |
protected void |
testGetDescriptorBase(java.lang.String name, java.lang.String read, java.lang.String write)Base for testGetDescriptorXxxxx() series of tests. |
void |
testGetDescriptorBoolean()Positive getPropertyDescriptor on property booleanProperty. |
void |
testGetDescriptorDouble()Positive getPropertyDescriptor on property doubleProperty. |
void |
testGetDescriptorFloat()Positive getPropertyDescriptor on property floatProperty. |
void |
testGetDescriptorInt()Positive getPropertyDescriptor on property intProperty. |
void |
testGetDescriptorLong()Positive getPropertyDescriptor on property longProperty. |
void |
testGetDescriptorReadOnly()Positive getPropertyDescriptor on property readOnlyProperty. |
void |
testGetDescriptors()Positive test for getPropertyDescriptors(). |
void |
testGetDescriptorsArguments()Corner cases on getPropertyDescriptors invalid arguments. |
void |
testGetDescriptorSecond()Positive getPropertyDescriptor on property booleanSecond that uses an "is" method as the getter. |
void |
testGetDescriptorShort()Positive getPropertyDescriptor on property shortProperty. |
void |
testGetDescriptorString()Positive getPropertyDescriptor on property stringProperty. |
void |
testGetDescriptorUnknown()Negative getPropertyDescriptor on property unknown. |
void |
testGetDescriptorWriteOnly()Positive getPropertyDescriptor on property writeOnlyProperty. |
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 |
testGetMappedPeriods()Test getting mapped values with periods in the key. |
void |
testGetMappedSlashes()Test getting mapped values with slashes in the key. |
void |
testGetMappedValues()Positive and negative tests on getMappedProperty valid arguments. |
void |
testGetNestedArguments()Corner cases on getNestedProperty invalid arguments. |
void |
testGetNestedBoolean()Test getNestedProperty on a boolean property. |
void |
testGetNestedDouble()Test getNestedProperty on a double property. |
void |
testGetNestedFloat()Test getNestedProperty on a float property. |
void |
testGetNestedInt()Test getNestedProperty on an int property. |
void |
testGetNestedLong()Test getNestedProperty on a long property. |
void |
testGetNestedReadOnly()Test getNestedProperty on a read-only String property. |
void |
testGetNestedShort()Test getNestedProperty on a short property. |
void |
testGetNestedString()Test getNestedProperty on a String property. |
void |
testGetNestedUnknown()Negative test getNestedProperty on an unknown property. |
void |
testGetNestedWriteOnly()Test getNestedProperty on a write-only String property. |
void |
testGetPropertyType()Test getPropertyType() on all kinds of properties. |
protected void |
testGetReadMethod(java.lang.Object bean, java.lang.String[] properties, java.lang.String className)Base for testGetReadMethod() series of tests. |
void |
testGetReadMethodBasic()Test getting accessible property reader methods for a specified list of properties of our standard test bean. |
void |
testGetReadMethodPackageSubclass()Test getting accessible property reader methods for a specified list of properties of a package private subclass of our standard test bean. |
void |
testGetReadMethodPublicInterface()Test getting accessible property reader methods for a specified list of properties that are declared either directly or via implemented interfaces. |
void |
testGetReadMethodPublicSubclass()Test getting accessible property reader methods for a specified list of properties of a public subclass of our standard test bean. |
void |
testGetSetInnerBean()Text case for setting properties on inner classes |
void |
testGetSetParentBean()Text case for setting properties on parent |
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 |
testGetSimpleIndexed()Negative test getSimpleProperty on an indexed property. |
void |
testGetSimpleInt()Test getSimpleProperty on an int property. |
void |
testGetSimpleLong()Test getSimpleProperty on a long property. |
void |
testGetSimpleNested()Negative test getSimpleProperty on a nested property. |
void |
testGetSimpleReadOnly()Test getSimpleProperty on a read-only String property. |
void |
testGetSimpleShort()Test getSimpleProperty on a short property. |
void |
testGetSimpleString()Test getSimpleProperty on a String property. |
void |
testGetSimpleUnknown()Negative test getSimpleProperty on an unknown property. |
void |
testGetSimpleWriteOnly()Test getSimpleProperty on a write-only String property. |
protected void |
testGetWriteMethod(java.lang.Object bean, java.lang.String[] properties, java.lang.String className)Base for testGetWriteMethod() series of tests. |
void |
testGetWriteMethodBasic()Test getting accessible property writer methods for a specified list of properties of our standard test bean. |
void |
testGetWriteMethodPackageSubclass()Test getting accessible property writer methods for a specified list of properties of a package private subclass of our standard test bean. |
void |
testGetWriteMethodPublicSubclass()Test getting accessible property writer methods for a specified list of properties of a public subclass of our standard test bean. |
void |
testMappedPropertyType()Test the mappedPropertyType of MappedPropertyDescriptor. |
void |
testNestedWithIndex() |
void |
testSetIndexedArguments()Corner cases on setIndexedProperty invalid arguments. |
void |
testSetIndexedValues()Positive and negative tests on setIndexedProperty valid arguments. |
void |
testSetMapExtension()This tests to see that classes that implement Map can have their standard properties set. |
void |
testSetMappedArguments()Corner cases on getMappedProperty invalid arguments. |
void |
testSetMappedValues()Positive and negative tests on setMappedProperty valid arguments. |
void |
testSetNestedArguments()Corner cases on setNestedProperty invalid arguments. |
void |
testSetNestedBoolean()Test setNextedProperty on a boolean property. |
void |
testSetNestedDouble()Test setNestedProperty on a double property. |
void |
testSetNestedFloat()Test setNestedProperty on a float property. |
void |
testSetNestedInt()Test setNestedProperty on a int property. |
void |
testSetNestedLong()Test setNestedProperty on a long property. |
void |
testSetNestedReadOnly()Test setNestedProperty on a read-only String property. |
void |
testSetNestedShort()Test setNestedProperty on a short property. |
void |
testSetNestedString()Test setNestedProperty on a String property. |
void |
testSetNestedUnknown()Test setNestedProperty on an unknown property name. |
void |
testSetNestedWriteOnly()Test setNestedProperty on a write-only String property. |
void |
testSetNoGetter() |
void |
testSetSimpleArguments()Corner cases on setSimpleProperty invalid 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 |
testSetSimpleIndexed()Negative test setSimpleProperty on an indexed property. |
void |
testSetSimpleInt()Test setSimpleProperty on a int property. |
void |
testSetSimpleLong()Test setSimpleProperty on a long property. |
void |
testSetSimpleNested()Negative test setSimpleProperty on a nested property. |
void |
testSetSimpleReadOnly()Test setSimpleProperty on a read-only String property. |
void |
testSetSimpleShort()Test setSimpleProperty on a short property. |
void |
testSetSimpleString()Test setSimpleProperty on a String property. |
void |
testSetSimpleUnknown()Test setSimpleProperty on an unknown property name. |
void |
testSetSimpleWriteOnly()Test setSimpleProperty on a write-only String property. |
| Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final java.lang.String PRIVATE_DIRECT_CLASS
private static final java.lang.String PRIVATE_INDIRECT_CLASS
private static final java.lang.String TEST_BEAN_CLASS
protected TestBean bean
protected TestBeanPackageSubclass beanPackageSubclass
protected PrivateDirect beanPrivate
protected PrivateDirect beanPrivateSubclass
protected TestBeanPublicSubclass beanPublicSubclass
protected java.lang.String[] describes
protected static final java.lang.String[] properties
getPropertyDescriptors(). You should update this list when new properties are added to TestBean.
| Constructor Detail |
public PropertyUtilsTestCase(java.lang.String name)
name - Name of the test case| Method Detail |
public void setUp()
public static junit.framework.Test suite()
public void tearDown()
public void testCopyPropertiesMap()
Map.
public void testDescribe()
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 testGetDescriptorReadOnly()
readOnlyProperty.
public void testGetDescriptorSecond()
booleanSecond that uses an "is" method as the getter.
public void testGetDescriptorShort()
shortProperty.
public void testGetDescriptorString()
stringProperty.
public void testGetDescriptorUnknown()
unknown.
public void testGetDescriptorWriteOnly()
writeOnlyProperty.
public void testGetDescriptors()
properties should be returned exactly once.
public void testGetDescriptorsArguments()
public void testGetIndexedArguments()
public void testGetIndexedValues()
public void testGetMappedArguments()
public void testGetMappedPeriods()
public void testGetMappedSlashes()
public void testGetMappedValues()
public void testGetNestedArguments()
public void testGetNestedBoolean()
public void testGetNestedDouble()
public void testGetNestedFloat()
public void testGetNestedInt()
public void testGetNestedLong()
public void testGetNestedReadOnly()
public void testGetNestedShort()
public void testGetNestedString()
public void testGetNestedUnknown()
public void testGetNestedWriteOnly()
public void testGetPropertyType()
public void testGetReadMethodBasic()
public void testGetReadMethodPackageSubclass()
public void testGetReadMethodPublicInterface()
public void testGetReadMethodPublicSubclass()
public void testGetSimpleArguments()
public void testGetSimpleBoolean()
public void testGetSimpleDouble()
public void testGetSimpleFloat()
public void testGetSimpleIndexed()
public void testGetSimpleInt()
public void testGetSimpleLong()
public void testGetSimpleNested()
public void testGetSimpleReadOnly()
public void testGetSimpleShort()
public void testGetSimpleString()
public void testGetSimpleUnknown()
public void testGetSimpleWriteOnly()
public void testGetWriteMethodBasic()
public void testGetWriteMethodPackageSubclass()
public void testGetWriteMethodPublicSubclass()
public void testMappedPropertyType()
throws java.lang.Exception
java.lang.Exceptionpublic void testSetIndexedArguments()
public void testSetIndexedValues()
public void testSetMappedArguments()
public void testSetMappedValues()
public void testSetNestedArguments()
public void testSetNestedBoolean()
public void testSetNestedDouble()
public void testSetNestedFloat()
public void testSetNestedInt()
public void testSetNestedLong()
public void testSetNestedReadOnly()
public void testSetNestedShort()
public void testSetNestedString()
public void testSetNestedUnknown()
public void testSetNestedWriteOnly()
public void testSetSimpleArguments()
public void testSetSimpleBoolean()
public void testSetSimpleDouble()
public void testSetSimpleFloat()
public void testSetSimpleIndexed()
public void testSetSimpleInt()
public void testSetSimpleLong()
public void testSetSimpleNested()
public void testSetSimpleReadOnly()
public void testSetSimpleShort()
public void testSetSimpleString()
public void testSetSimpleUnknown()
public void testSetSimpleWriteOnly()
protected void testGetDescriptorBase(java.lang.String name,
java.lang.String read,
java.lang.String write)
name - Name of the property to be retrievedread - Expected name of the read method (or null)write - Expected name of the write method (or null)
protected void testGetReadMethod(java.lang.Object bean,
java.lang.String[] properties,
java.lang.String className)
bean - Bean for which to retrieve read methods.properties - Property names to search forclassName - Class name where this method should be defined
protected void testGetWriteMethod(java.lang.Object bean,
java.lang.String[] properties,
java.lang.String className)
bean - Bean for which to retrieve write methods.properties - Property names to search forclassName - Class name where this method should be defined
public void testNestedWithIndex()
throws java.lang.Exception
java.lang.Exception
public void testGetSetInnerBean()
throws java.lang.Exception
java.lang.Exception
public void testGetSetParentBean()
throws java.lang.Exception
java.lang.Exception
public void testSetNoGetter()
throws java.lang.Exception
java.lang.Exception
public void testSetMapExtension()
throws java.lang.Exception
java.lang.Exception
|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||