com.agical.rmock.core.expectation
Class InvocationExpectationVisitor

java.lang.Object
  extended by com.agical.rmock.core.expectation.InvocationExpectationVisitor
All Implemented Interfaces:
ExpectationVisitor

public class InvocationExpectationVisitor
extends java.lang.Object
implements ExpectationVisitor

Finds a matching expectation and returns its action. If no match is found, null is returned. (c) Agical AB 2005

Author:
joakim.ohlrogge

Constructor Summary
InvocationExpectationVisitor(java.lang.String id, java.lang.String method, java.lang.Object[] arguments)
           
 
Method Summary
 void enteredSection(Section section)
          Called when a section is entered
 void exitedSection()
          called when the current section has exited.
 Action getMatchedAction()
           
 boolean visit(Expectation expectation, boolean available)
          Visits expectations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvocationExpectationVisitor

public InvocationExpectationVisitor(java.lang.String id,
                                    java.lang.String method,
                                    java.lang.Object[] arguments)
Parameters:
id - the id of the calling object
method - the name of the method to be called
arguments - the arguments of the
Method Detail

visit

public boolean visit(Expectation expectation,
                     boolean available)
Description copied from interface: ExpectationVisitor
Visits expectations

Specified by:
visit in interface ExpectationVisitor
Parameters:
expectation - the expectation to visit
available - true if this expectation is considered to be available by the surrounding section.
Returns:
true if the visitor is still active (wants to visit more expectations)
See Also:
ExpectationVisitor.visit(Expectation, boolean)

getMatchedAction

public Action getMatchedAction()
Returns:
the action of the matched expectation, null if no expectation was matched

enteredSection

public void enteredSection(Section section)
Description copied from interface: ExpectationVisitor
Called when a section is entered

Specified by:
enteredSection in interface ExpectationVisitor

exitedSection

public void exitedSection()
Description copied from interface: ExpectationVisitor
called when the current section has exited.

Specified by:
exitedSection in interface ExpectationVisitor


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