|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface IExpectationSetters<T>
Allows setting expectations for an associated expected invocation.
Implementations of this interface are returned by EasyMock.expect(Object),
and by EasyMock.expectLastCall().
| Method Summary | |
|---|---|
IExpectationSetters<T> |
andReturn(T value)
Sets a return value that should be returned for the expected invocation. |
void |
andStubReturn(java.lang.Object value)
Sets a stub return value that should be returned for the expected invocation. |
void |
andStubThrow(java.lang.Throwable throwable)
Sets a stub throwable that should be thrown for the expected invocation. |
IExpectationSetters<T> |
andThrow(java.lang.Throwable throwable)
Sets a throwable that should be thrown for the expected invocation. |
IExpectationSetters<T> |
anyTimes()
Expect the last invocation any times. |
void |
asStub()
Sets stub behavior for the expected invocation (this is needed for void methods). |
IExpectationSetters<T> |
atLeastOnce()
Expect the last invocation at least once. |
IExpectationSetters<T> |
callback(java.lang.Runnable callback)
Sets a callback that should be called for the expected invocation. |
IExpectationSetters<T> |
once()
Expect the last invocation once. |
IExpectationSetters<T> |
times(int count)
Expect the last invocation count times. |
IExpectationSetters<T> |
times(int min,
int max)
Expect the last invocation between min and
max times. |
| Method Detail |
|---|
IExpectationSetters<T> andReturn(T value)
value - the value to return.
IExpectationSetters<T> andThrow(java.lang.Throwable throwable)
throwable - the throwable to throw.
void andStubReturn(java.lang.Object value)
value - the value to return.void andStubThrow(java.lang.Throwable throwable)
throwable - the throwable to throw.void asStub()
IExpectationSetters<T> callback(java.lang.Runnable callback)
callback - the callback to call.
IExpectationSetters<T> times(int count)
count times.
count - the number of invocations expected.
IExpectationSetters<T> times(int min,
int max)
min and
max times.
min - the minimum number of invocations expected.max - the maximum number of invocations expected.
IExpectationSetters<T> once()
IExpectationSetters<T> atLeastOnce()
IExpectationSetters<T> anyTimes()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||