org.easymock.internal

Class MocksControl

Implemented Interfaces:
IMocksControl

public class MocksControl
extends java.lang.Object
implements IMocksControl

Nested Class Summary

class
MocksControl.MockType

Field Summary

static Range
AT_LEAST_ONCE
One or more calls.
static Range
ONCE
Exactly one call.
static Range
ZERO_OR_MORE
Zero or more calls.

Constructor Summary

MocksControl(MocksControl.MockType type)

Method Summary

protected
IProxyFactory createProxyFactory(Class toMock)
T createMock(Class toMock)
T createMock(String name, Class toMock)
IExpectationSetters
andAnswer(IAnswer answer)
IExpectationSetters
andReturn(Object value)
void
andStubAnswer(IAnswer answer)
void
andStubReturn(Object value)
void
andStubThrow(Throwable throwable)
IExpectationSetters
andThrow(Throwable throwable)
IExpectationSetters
anyTimes()
void
asStub()
IExpectationSetters
atLeastOnce()
void
checkOrder(boolean value)
IMocksControlState
getState()
IExpectationSetters
once()
void
replay()
void
reset()
void
setLegacyDefaultMatcher(ArgumentsMatcher matcher)
void
setLegacyDefaultReturnValue(Object value)
void
setLegacyDefaultThrowable(Throwable throwable)
void
setLegacyDefaultVoidCallable()
void
setLegacyMatcher(ArgumentsMatcher matcher)
IExpectationSetters
times(int times)
IExpectationSetters
times(int min, int max)
void
verify()

Field Details

AT_LEAST_ONCE

public static final Range AT_LEAST_ONCE
One or more calls.

ONCE

public static final Range ONCE
Exactly one call.

ZERO_OR_MORE

public static final Range ZERO_OR_MORE
Zero or more calls.

Constructor Details

MocksControl

public MocksControl(MocksControl.MockType type)

Method Details

IProxyFactory createProxyFactory

protected  IProxyFactory createProxyFactory(Class toMock)

T createMock

public  T createMock(Class toMock)

T createMock

public  T createMock(String name,
                        Class toMock)

andAnswer

public IExpectationSetters andAnswer(IAnswer answer)

andReturn

public IExpectationSetters andReturn(Object value)

andStubAnswer

public void andStubAnswer(IAnswer answer)

andStubReturn

public void andStubReturn(Object value)

andStubThrow

public void andStubThrow(Throwable throwable)

andThrow

public IExpectationSetters andThrow(Throwable throwable)

anyTimes

public IExpectationSetters anyTimes()

asStub

public void asStub()

atLeastOnce

public IExpectationSetters atLeastOnce()

checkOrder

public void checkOrder(boolean value)

getState

public IMocksControlState getState()

once

public IExpectationSetters once()

replay

public void replay()

reset

public final void reset()

setLegacyDefaultMatcher

public void setLegacyDefaultMatcher(ArgumentsMatcher matcher)

setLegacyDefaultReturnValue

public void setLegacyDefaultReturnValue(Object value)

setLegacyDefaultThrowable

public void setLegacyDefaultThrowable(Throwable throwable)

setLegacyDefaultVoidCallable

public void setLegacyDefaultVoidCallable()

setLegacyMatcher

public void setLegacyMatcher(ArgumentsMatcher matcher)

times

public IExpectationSetters times(int times)

times

public IExpectationSetters times(int min,
                                 int max)

verify

public void verify()