org.mockcentral.editor.nodes.expectation
Class ExpectationController

java.lang.Object
  extended by org.mockcentral.editor.nodes.expectation.ExpectationController

public class ExpectationController
extends java.lang.Object

The controller class within the MVC structure that includes the ExpectationModel and IMockCentralNodeView classes.

Author:
David Hutchinson

Constructor Summary
ExpectationController(ExpectationModel nodeModel)
          Creates a new instance, assigning the node model.
 
Method Summary
 void addParameter(int index, org.mockcentral.server.SignaturePartBean partModel)
          Adds the supplied SignaturePartBean to the list of modeled Mock Object method parameters.
 void deleteParameter(org.mockcentral.server.SignaturePartBean partModel)
          Deletes the supplied SignaturePartBean from the list of modeled Mock Object method parameters.
 void setAnyParameters(boolean b)
          Sets the value for whether the Mock Object method expectation will accept all/any parameters.
 void setMethodName(java.lang.String methodName)
          Sets the Mock Object method name value.
 void setMethodType(java.lang.String methodType)
          Sets the Mock Object method type value.
 void setParameter(int index, org.mockcentral.server.SignaturePartBean partModel)
          Sets the data for the indexed modeled method parameter to that contained in the SignaturePartBean argument.
 void setResult(org.mockcentral.server.SignaturePartBean partModel)
          Sets the Mock Object method result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpectationController

public ExpectationController(ExpectationModel nodeModel)
Creates a new instance, assigning the node model.

Parameters:
nodeModel - the current ExpectationModel.
Method Detail

setMethodName

public void setMethodName(java.lang.String methodName)
Sets the Mock Object method name value.

Parameters:
methodName - the value to set.

setMethodType

public void setMethodType(java.lang.String methodType)
Sets the Mock Object method type value.

Parameters:
methodType - the value to set.

addParameter

public void addParameter(int index,
                         org.mockcentral.server.SignaturePartBean partModel)
Adds the supplied SignaturePartBean to the list of modeled Mock Object method parameters.

Parameters:
index - the index at which to add the the supplied SignaturePartBean.
partModel - the SignaturePartBean to add to the modeled list of Mock Object method parameters.

deleteParameter

public void deleteParameter(org.mockcentral.server.SignaturePartBean partModel)
Deletes the supplied SignaturePartBean from the list of modeled Mock Object method parameters.

Parameters:
partModel - the SignaturePartBean to remove from the modeled list of Mock Object method parameters.

setParameter

public void setParameter(int index,
                         org.mockcentral.server.SignaturePartBean partModel)
Sets the data for the indexed modeled method parameter to that contained in the SignaturePartBean argument.

Parameters:
index - the index of the modeled method paramter in the list.
partModel - the SignaturePartBean containing the new parameter data.

setAnyParameters

public void setAnyParameters(boolean b)
Sets the value for whether the Mock Object method expectation will accept all/any parameters.

Parameters:
b - the value to set.

setResult

public void setResult(org.mockcentral.server.SignaturePartBean partModel)
Sets the Mock Object method result.

Parameters:
partModel - the SignaturePartBean modeling the Mock Object method result, or null if the result is to be void.