|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mockcentral.server.MockObjectSetup
public class MockObjectSetup
Class used for constructing Mock Object instances. The Mock Object name,
class name and JNDI name (if used) are assigned when this class is built from
the configuration file. When this instance is loaded into its enclosing
Fixture, the Mock Object is instantiated and the list of
MethodExpectationBean instances is processed to add method
expectations to it.
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 | |
|---|---|
MockObjectSetup()
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
addMethodExpectation(MethodExpectationBean bean)
Adds an entry to the list of all the MethodExpectationBean
instances used to create the Mock Object. |
com.mockobjects.dynamic.Mock |
createMockObject()
Creates the Mock Object and adds method expectations to it using the list of MethodExpectationBean instances. |
java.lang.String |
getJndiName()
Returns the name (if any) under which the proxy will be bound in the MockCentralTestingContext. |
java.lang.String |
getMockObjectName()
Returns the name identifying the Mock Object. |
void |
setClassName(java.lang.String className)
Sets the class name of the Mock Object. |
void |
setFixtureName(java.lang.String fixtureName)
Sets the current Fixture name. |
void |
setJndiName(java.lang.String jndiName)
Sets the name (if any) under which the proxy will be bound in the MockCentralTestingContext. |
void |
setMockObjectName(java.lang.String mockObjectName)
Sets the name identifying the Mock Object. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MockObjectSetup()
| Method Detail |
|---|
public void setFixtureName(java.lang.String fixtureName)
Fixture name.
fixtureName - the current Fixture name.public void setMockObjectName(java.lang.String mockObjectName)
mockObjectName - the name identifying the Mock Object.public java.lang.String getMockObjectName()
public void setClassName(java.lang.String className)
className - the class name of the Mock Object.public void setJndiName(java.lang.String jndiName)
MockCentralTestingContext.
jndiName - the name (if any) under which the proxy will be bound in the
MockCentralTestingContext.public java.lang.String getJndiName()
MockCentralTestingContext.
MockCentralTestingContext.public void addMethodExpectation(MethodExpectationBean bean)
MethodExpectationBean
instances used to create the Mock Object.
bean - the MethodExpectationBean to add to the list.
public com.mockobjects.dynamic.Mock createMockObject()
throws UnknownProxyException,
MockCentralServerException
MethodExpectationBean instances.
UnknownProxyException
MockCentralServerExceptionpublic 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 | |||||||||