|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mockcentral.editor.nodes.MockCentralNodeModel
org.mockcentral.editor.nodes.mockobject.MockObjectModel
public class MockObjectModel
A class that models a Mock Object defined in the jdom Element of
a MockObjectNode object.
| Field Summary |
|---|
| Fields inherited from class org.mockcentral.editor.nodes.MockCentralNodeModel |
|---|
element, node, observers |
| Constructor Summary | |
|---|---|
MockObjectModel(MockObjectNode node)
Assigns the MockCentralNode. |
|
| Method Summary | |
|---|---|
void |
addObserver(IMockObjectModelObserver observer)
Adds an IMockObjectModelObserver instance to the observers
list. |
void |
editExpectations()
Activates the ExpectationGroupNode for this Mock Object. |
java.lang.String |
getDefaultNewJndiName()
Returns a default value for the JNDI name which will be unique within the Fixture. |
java.lang.String |
getJndiName()
Returns the current value for the name under which the Mock Object will be bound in the testing Context, if any. |
java.lang.String |
getMockObjectInterface()
Returns the current value for the mocked interface class name. |
java.lang.String |
getMockObjectName()
Returns the current Mock Object name value. |
java.lang.String |
getNotRemovableMessage()
Returns a message for display indicating why the corresposing MockCentralNode instance cannot be deleted, or null (as this
default implementation does). |
boolean |
hasReferenceTo(java.lang.String mockObjectName)
Returns whether the modeled Mock Object has a reference (within a method parameter or method result) to the one identified by the parameter. |
void |
loadElementData(boolean refreshUI)
Loads the data from the JDOM Element provided by the
MockCentralNode into the model. |
void |
setJndiName(java.lang.String jndiName)
Sets the JNDI name value. |
void |
setMockObjectInterface(java.lang.String mockObjectInterface)
Sets the Mock Object interface Class name. |
void |
setMockObjectName(java.lang.String mockObjectName,
boolean updateReferences)
Sets the Mock Object name. |
void |
updateMockObjectReference(java.lang.String oldName,
java.lang.String newName)
Updates the value for the name of a Mock Object referenced within this one's method expectations. |
| Methods inherited from class org.mockcentral.editor.nodes.MockCentralNodeModel |
|---|
addObserver, getElement, getEnclosingFixtureNode, getNode, getObservers, registerChanges, removeObserver |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockObjectModel(MockObjectNode node)
MockCentralNode.
node - the MockCentralNode containing the jdom
element whose data this class models.| Method Detail |
|---|
public void loadElementData(boolean refreshUI)
MockCentralNodeModelElement provided by the
MockCentralNode into the model.
loadElementData in class MockCentralNodeModelrefreshUI - whether to send notification to ui components to update
the display.public void addObserver(IMockObjectModelObserver observer)
IMockObjectModelObserver instance to the observers
list.
observer - the ModelObserver instance to add.public boolean hasReferenceTo(java.lang.String mockObjectName)
mockObjectName - the name of the Mock Object to look for a reference
to.
public void setMockObjectName(java.lang.String mockObjectName,
boolean updateReferences)
mockObjectName - the value for the Mock Object name.updateReferences - whether to update references to the orignal Mock
Object name within other Mock Objects' methods
public void updateMockObjectReference(java.lang.String oldName,
java.lang.String newName)
oldName - the old value for the name.newName - the new value for the name.public java.lang.String getMockObjectName()
public void setMockObjectInterface(java.lang.String mockObjectInterface)
mockObjectInterface - the value for the Mock Object interface Class
name.public java.lang.String getMockObjectInterface()
public java.lang.String getDefaultNewJndiName()
public void setJndiName(java.lang.String jndiName)
jndiName - the value to set.public java.lang.String getJndiName()
Context, if any.
Context, if any.public void editExpectations()
ExpectationGroupNode for this Mock Object.
public java.lang.String getNotRemovableMessage()
MockCentralNodeModelMockCentralNode instance cannot be deleted, or null (as this
default implementation does).
getNotRemovableMessage in class MockCentralNodeModelMockCentralNode instance cannot be deleted, or null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||