net.sf.navel.beans
Class MethodHandlerTest

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

public class MethodHandlerTest
extends java.lang.Object

This class exercises the delegation mechanism in the DelegateBeanHandler. Delegation support is provided by extending PropertyBeanHandler and accepting an array of delegation targets during contruction. During the dynamic proxy call, anything that cannot be handled by the code in the parent class is then attempted to be match to a delegation target and invoked if possible.

Author:
cmdln

Constructor Summary
MethodHandlerTest()
           
 
Method Summary
protected  void setUp()
           
 void testAttachValidation()
          Test that construction with a mis-matched DelegationTarget fails.
 void testDelegation()
          Exercise the DelegationTarget mechanism.
 void testInitialValues()
          Test that construction with initial values still works as expected.
 void testLenientValidation()
          Test that construction with a mis-matched DelegationTarget fails.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodHandlerTest

public MethodHandlerTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
junit.framework.TestCase#setUp()

testAttachValidation

public void testAttachValidation()
Test that construction with a mis-matched DelegationTarget fails.


testLenientValidation

public void testLenientValidation()
Test that construction with a mis-matched DelegationTarget fails.


testInitialValues

public void testInitialValues()
Test that construction with initial values still works as expected.


testDelegation

public void testDelegation()
                    throws UnsupportedFeatureException,
                           InvalidPropertyValueException
Exercise the DelegationTarget mechanism.

Throws:
UnsupportedFeatureException - Not testing construction, fail.
InvalidPropertyValueException - Not testing construction, fail.