org.jete.model
Class MethodInvocationAction

java.lang.Object
  extended byorg.jete.cases.ValidatedTestAction
      extended byorg.jete.model.MethodInvocationAction
All Implemented Interfaces:
MethodResultAction, TestAction

public class MethodInvocationAction
extends ValidatedTestAction
implements MethodResultAction

Provide an interface for an action in the test system to arbitrarily call a particular object method. This uses Spring's reflection to invoke an object method as a test action.

Handy for integration testing, web model stub testing, etc. Provides a nice service system level test when invoking object methods running as services.

Version:
$Id: MethodInvocationAction.html,v 1.3 2006/03/12 02:46:59 tdeast Exp $

Constructor Summary
MethodInvocationAction()
           
 
Method Summary
protected  void doAction()
          Retrieve the specified method of the submitted object, and invoke it with the specified parameters.
 java.util.List getArguments()
           
 java.lang.Object getResult()
           
 java.lang.String getTargetMethod()
           
 java.lang.Object getTargetObject()
           
 void setArguments(java.util.List arguments)
           
 void setResult(java.lang.Object result)
           
 void setTargetMethod(java.lang.String targetMethod)
           
 void setTargetObject(java.lang.Object targetObject)
           
 
Methods inherited from class org.jete.cases.ValidatedTestAction
getValidators, runAction, setValidators
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodInvocationAction

public MethodInvocationAction()
Method Detail

doAction

protected void doAction()
                 throws ActionException
Retrieve the specified method of the submitted object, and invoke it with the specified parameters. Leverages existing invocation code utilizing Spring's MethodInvokingFactoryBean.

Specified by:
doAction in class ValidatedTestAction
Throws:
ActionException

getResult

public java.lang.Object getResult()
Specified by:
getResult in interface MethodResultAction

setResult

public void setResult(java.lang.Object result)

getTargetObject

public java.lang.Object getTargetObject()

setTargetObject

public void setTargetObject(java.lang.Object targetObject)

getTargetMethod

public java.lang.String getTargetMethod()

setTargetMethod

public void setTargetMethod(java.lang.String targetMethod)

getArguments

public java.util.List getArguments()

setArguments

public void setArguments(java.util.List arguments)