com.agical.rmock.core.expectation
Class ExpectationImpl

java.lang.Object
  extended by com.agical.rmock.core.expectation.ExpectationImpl
All Implemented Interfaces:
Expectation, ModifiableExpectation, Visitable

public class ExpectationImpl
extends java.lang.Object
implements ModifiableExpectation

(c) Agical AB 2005

Author:
joakim.ohlrogge

Constructor Summary
ExpectationImpl()
           
 
Method Summary
 boolean accept(ExpectationVisitor expectationVisitor, boolean available)
          accepts a visitor
 boolean canMatch()
           
 Action getAction()
           
 Expression[] getArguments()
           
 java.lang.String getId()
           
 java.lang.String getMethod()
           
 Multiplicity getMultiplicity()
           
 boolean isSatisfied()
           
 void setAction(Action action)
           
 void setArguments(Expression[] argumentConstrants)
           
 void setId(java.lang.String id)
           
 void setMethod(java.lang.String method)
           
 void setMultiplicity(Multiplicity multiplicity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpectationImpl

public ExpectationImpl()
Method Detail

setId

public void setId(java.lang.String id)
Specified by:
setId in interface ModifiableExpectation
Parameters:
constraint -

getId

public java.lang.String getId()
Specified by:
getId in interface Expectation
Returns:
Returns the id.

setMethod

public void setMethod(java.lang.String method)
Specified by:
setMethod in interface ModifiableExpectation
Parameters:
constraint -

getMethod

public java.lang.String getMethod()
Specified by:
getMethod in interface Expectation
Returns:
Returns the method.

setMultiplicity

public void setMultiplicity(Multiplicity multiplicity)
Specified by:
setMultiplicity in interface ModifiableExpectation
Parameters:
multiplicity -

getMultiplicity

public Multiplicity getMultiplicity()
Specified by:
getMultiplicity in interface Expectation
Returns:
Returns the multiplicity.

setArguments

public void setArguments(Expression[] argumentConstrants)
Specified by:
setArguments in interface ModifiableExpectation
Parameters:
argumentConstrants -

getArguments

public Expression[] getArguments()
Specified by:
getArguments in interface Expectation
Returns:
Returns the argumentConstrants.

setAction

public void setAction(Action action)
Specified by:
setAction in interface ModifiableExpectation
Parameters:
action - The action to set.

getAction

public Action getAction()
Specified by:
getAction in interface Expectation
Returns:
Returns the action.

accept

public boolean accept(ExpectationVisitor expectationVisitor,
                      boolean available)
Description copied from interface: Visitable
accepts a visitor

Specified by:
accept in interface Visitable
Parameters:
expectationVisitor - the visitor to accept.
available - true if this visitable is considered available by its container
Returns:
See Also:
com.agical.rmock.core.Expectation#accept(com.agical.rmock.core.expectation.section.ExpectationVisitor)

canMatch

public boolean canMatch()
Specified by:
canMatch in interface Visitable
Returns:
true if this visitable can match

isSatisfied

public boolean isSatisfied()
Specified by:
isSatisfied in interface Visitable
Returns:
true if this visitable is satisfied


Copyright © 2005-2010 Agical AB. All Rights Reserved.