org.jmock.core

Class InvocationMocker

Implemented Interfaces:
Invokable, SelfDescribing, StubMatchersCollection, Verifiable

public class InvocationMocker
extends Object
implements Invokable, StubMatchersCollection

Nested Class Summary

static interface
InvocationMocker.Describer

Field Summary

static InvocationMocker.Describer
DEFAULT_DESCRIBER

Constructor Summary

InvocationMocker()
InvocationMocker(InvocationMocker.Describer describer)

Method Summary

void
addMatcher(InvocationMatcher matcher)
StringBuffer
describeTo(StringBuffer buffer)
boolean
hasDescription()
Object
invoke(Invocation invocation)
boolean
matches(Invocation invocation)
void
setName(String name)
void
setStub(Stub stub)
String
toString()
void
verify()

Field Details

DEFAULT_DESCRIBER

public static final InvocationMocker.Describer DEFAULT_DESCRIBER

Constructor Details

InvocationMocker

public InvocationMocker()

InvocationMocker

public InvocationMocker(InvocationMocker.Describer describer)

Method Details

addMatcher

public void addMatcher(InvocationMatcher matcher)
Specified by:
addMatcher in interface StubMatchersCollection

describeTo

public StringBuffer describeTo(StringBuffer buffer)
Specified by:
describeTo in interface SelfDescribing

hasDescription

public boolean hasDescription()
Specified by:
hasDescription in interface Invokable

invoke

public Object invoke(Invocation invocation)
            throws Throwable
Specified by:
invoke in interface Invokable

matches

public boolean matches(Invocation invocation)
Specified by:
matches in interface Invokable

setName

public void setName(String name)
Specified by:
setName in interface StubMatchersCollection

setStub

public void setStub(Stub stub)
Specified by:
setStub in interface StubMatchersCollection

toString

public String toString()

verify

public void verify()
Specified by:
verify in interface Verifiable