groovy.mock
Class GroovyMock

java.lang.Object
  extended by groovy.lang.GroovyObjectSupport
      extended by groovy.mock.GroovyMock
All Implemented Interfaces:
com.mockobjects.Verifiable, GroovyObject

public class GroovyMock
extends GroovyObjectSupport
implements com.mockobjects.Verifiable

Version:
$Revision: 6778 $
Author:
Joe Walnes, Chris Stevenson

Nested Class Summary
(package private) static interface GroovyMock.I
           
 
Field Summary
private  com.mockobjects.dynamic.CallFactory callFactory
           
private  com.mockobjects.dynamic.CallBag calls
           
private  GroovyObject instance
           
private  com.mockobjects.dynamic.Mock mock
           
 
Constructor Summary
GroovyMock()
           
 
Method Summary
private  java.lang.Object callMethod(java.lang.String name, java.lang.Object args)
           
private  com.mockobjects.dynamic.ConstraintMatcher createMatcher(java.lang.Object args)
           
private  void expectMethod(java.lang.String name, java.lang.Object args)
           
 GroovyObject getInstance()
           
 java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)
          Invokes the given method.
static GroovyMock newInstance()
           
 void verify()
           
 
Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, getProperty, setMetaClass, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

calls

private com.mockobjects.dynamic.CallBag calls

callFactory

private com.mockobjects.dynamic.CallFactory callFactory

mock

private com.mockobjects.dynamic.Mock mock

instance

private GroovyObject instance
Constructor Detail

GroovyMock

public GroovyMock()
Method Detail

invokeMethod

public java.lang.Object invokeMethod(java.lang.String name,
                                     java.lang.Object args)
Description copied from interface: GroovyObject
Invokes the given method.

Specified by:
invokeMethod in interface GroovyObject
Overrides:
invokeMethod in class GroovyObjectSupport
Parameters:
name - the name of the method to call
args - the arguments to use for the method call
Returns:
the result of invoking the method

getInstance

public GroovyObject getInstance()

newInstance

public static GroovyMock newInstance()

expectMethod

private void expectMethod(java.lang.String name,
                          java.lang.Object args)

createMatcher

private com.mockobjects.dynamic.ConstraintMatcher createMatcher(java.lang.Object args)

callMethod

private java.lang.Object callMethod(java.lang.String name,
                                    java.lang.Object args)

verify

public void verify()
Specified by:
verify in interface com.mockobjects.Verifiable


Copyright © ${year} The Codehaus. All Rights Reserved.