net.sf.navel.beans
Class BeanManipulatorTest

java.lang.Object
  extended by net.sf.navel.beans.BeanManipulatorTest

public class BeanManipulatorTest
extends java.lang.Object

Exercises the two primary activities of the bean manipulator.

Author:
cmdln

Constructor Summary
BeanManipulatorTest()
           
 
Method Summary
 java.lang.Object[][] buildTypesOf()
           
 void testBadIndexed()
          Test population of indexed properties with a bad value for the index inside the braces.
 void testDescribeReadWrite()
          Exercise bean description on the ReadWriteBean backed by the ProperyBeanHandler.
 void testFailedTypesOf()
           
 void testFromBeanToBean()
          Test extracting from and inject into concrete beans.
 void testIndexedIsProperty()
           
 void testIsProperty()
           
 void testNoProperties()
          Test that BeanManipulator doesn't return a null Map from describe when there is nothing to describe.
 void testPartialIndexedMethods()
           
 void testPopulateIndexed()
          Test population of indexed properties.
 void testPopulateNested()
          Test population of nested properties, using "dot notation".
 void testPopulateReadWrite()
          Test populating the ReadWriteBean backed by a PropertyBeanHandler with the BeanManipulator.
 void testPut()
           
 void testPutIndexed()
           
 void testPutNested()
           
 void testStringConversion()
          Test that String to primitive conversion works as expected.
 void testTypesOf(java.lang.Class<?> beanType, java.lang.String property, java.lang.Class<?> expected)
           
 void testTypesOfList()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanManipulatorTest

public BeanManipulatorTest()
Method Detail

testDescribeReadWrite

public void testDescribeReadWrite()
                           throws InvalidPropertyValueException,
                                  UnsupportedFeatureException
Exercise bean description on the ReadWriteBean backed by the ProperyBeanHandler.

Throws:
InvalidPropertyValueException - Not testing construction, error on problem.
UnsupportedFeatureException - Not testing construction, error on problem.

testNoProperties

public void testNoProperties()
Test that BeanManipulator doesn't return a null Map from describe when there is nothing to describe.


testPopulateReadWrite

public void testPopulateReadWrite()
                           throws UnsupportedFeatureException,
                                  InvalidPropertyValueException
Test populating the ReadWriteBean backed by a PropertyBeanHandler with the BeanManipulator.

Throws:
UnsupportedFeatureException - Not testing construction, error on problem.
InvalidPropertyValueException - Not testing construction, error on problem.

testFromBeanToBean

public void testFromBeanToBean()
Test extracting from and inject into concrete beans.


testPopulateNested

public void testPopulateNested()
                        throws InvalidPropertyValueException,
                               UnsupportedFeatureException
Test population of nested properties, using "dot notation".

Throws:
InvalidPropertyValueException - Ignore construction errors.
UnsupportedFeatureException - Ignore construction errors.

testPopulateIndexed

public void testPopulateIndexed()
                         throws UnsupportedFeatureException,
                                InvalidPropertyValueException
Test population of indexed properties.

Throws:
InvalidPropertyValueException - Ignore construction errors.
UnsupportedFeatureException - Ignore construction errors.

testPut

public void testPut()

testPutNested

public void testPutNested()

testPutIndexed

public void testPutIndexed()

testBadIndexed

public void testBadIndexed()
                    throws UnsupportedFeatureException,
                           InvalidPropertyValueException
Test population of indexed properties with a bad value for the index inside the braces.

Throws:
InvalidPropertyValueException - Ignore construction errors.
UnsupportedFeatureException - Ignore construction errors.

testStringConversion

public void testStringConversion()
                          throws UnsupportedFeatureException,
                                 InvalidPropertyValueException
Test that String to primitive conversion works as expected.

Throws:
InvalidPropertyValueException - Ignore construction errors.
UnsupportedFeatureException - Ignore construction errors.

testIndexedIsProperty

public void testIndexedIsProperty()

testIsProperty

public void testIsProperty()

testTypesOf

public void testTypesOf(java.lang.Class<?> beanType,
                        java.lang.String property,
                        java.lang.Class<?> expected)

testTypesOfList

public void testTypesOfList()

buildTypesOf

public java.lang.Object[][] buildTypesOf()

testPartialIndexedMethods

public void testPartialIndexedMethods()

testFailedTypesOf

public void testFailedTypesOf()