|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mockcentral.server.MethodExpectationBean
public class MethodExpectationBean
A simple bean class used for creating a method expectation for a Mock Object.
This class stores SignaturePartBean objects used to create the
method parameters and expected result for the method, as well as the method
name and Mock Object method type ("match and return", "expect and throw",
etc), which will be represented by a MockMethodType enum value.
if the anyParams flag is set, the ParamsBuilder
class will construct an AnyConstraintMatcher for the
expectation, meaning that the Mock Object will accept invocations of the
method with any (or no) parameters.
The "add" and "set" methods defined in this class are invoked by the
org.apache.commons.digester.Digester when the configuration file
is parsed, and should not be called by clients.
| Constructor Summary | |
|---|---|
MethodExpectationBean()
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
addParamBean(SignaturePartBean bean)
Adds an entry to the list of SignaturePartBean objects used
to create the expectation's method parameters. |
java.lang.String |
getMethodName()
Returns the method name for the expectation. |
MockMethodType |
getMockMethodType()
Returns the MockMethodType enum value for the expectation. |
java.util.ArrayList<SignaturePartBean> |
getParamBeans()
Returns the list of SignaturePartBean objects used to create
the expectation's method parameters. |
SignaturePartBean |
getResultBean()
Returns the SignaturePartBean object used to create the
expectation's result. |
java.lang.String |
isAnyParams()
Returns the flag indicating whether the method will accept any parameters. |
void |
setAnyParams(java.lang.String anyParams)
Sets the flag indicating whether the method will accept any parameters (if true, an AnyConstraintMatcher will be used to construct
the method parameter). |
void |
setMethodName(java.lang.String methodName)
Sets the method name for the expectation. |
void |
setMockMethod(java.lang.String mockMethodType)
Assigns the MockMethodType enum value for the expectation. |
void |
setResultBean(SignaturePartBean resultBean)
Sets the SignaturePartBean object used to create the
expectation's result. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MethodExpectationBean()
| Method Detail |
|---|
public void setMethodName(java.lang.String methodName)
methodName - the method name for the expectation.public java.lang.String getMethodName()
public void setAnyParams(java.lang.String anyParams)
AnyConstraintMatcher will be used to construct
the method parameter).
anyParams - the flag indicating whether the method will accept any
parameters.public java.lang.String isAnyParams()
public void addParamBean(SignaturePartBean bean)
SignaturePartBean objects used
to create the expectation's method parameters.
bean - an entry to add to the list of SignaturePartBean
objects used to create the expectation's method parameters.public java.util.ArrayList<SignaturePartBean> getParamBeans()
SignaturePartBean objects used to create
the expectation's method parameters.
SignaturePartBean objects used to create
the expectation's method parameters.public void setMockMethod(java.lang.String mockMethodType)
MockMethodType enum value for the expectation.
mockMethodType - a String used to look up the MockMethodType enum
value for the expectation.public MockMethodType getMockMethodType()
MockMethodType enum value for the expectation.
MockMethodType enum value for the expectation.public void setResultBean(SignaturePartBean resultBean)
SignaturePartBean object used to create the
expectation's result.
resultBean - athe SignaturePartBean object used to create the
expectation's result.public SignaturePartBean getResultBean()
SignaturePartBean object used to create the
expectation's result.
SignaturePartBean object used to create the
expectation's result.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||