EasyMock#expect(Object), and by EasyMock#expectLastCall().
| Modifier and Type | Method and Description |
|---|---|
| public IExpectationSetters | |
| public IExpectationSetters | Returns: the value returned by the delegated call.the object the call is delegated to. delegateTo)Sets an object implementing the same interface as the mock. |
| public IExpectationSetters | Returns: this object to allow method call chaining.the value to return. value)Sets a return value that will be returned for the expected invocation. |
| public void | andStubAnswer(IAnswer<? extends T>
the object used to answer the invocation. answer)Sets a stub object that will be used to calculate the answer for the expected invocation (either return a value, or throw an exception). |
| public void | andStubDelegateTo(Object
the object the call is delegated to. delegateTo)Sets a stub object implementing the same interface as the mock. |
| public void | andStubReturn(T
the value to return. value)Sets a stub return value that will be returned for the expected invocation. |
| public void | andStubThrow(Throwable
the throwable to throw. throwable)Sets a stub throwable that will be thrown for the expected invocation. |
| public IExpectationSetters | |
| public IExpectationSetters | |
| public IExpectationSetters | |
| public void | |
| public IExpectationSetters | Returns: this object to allow method call chaining.Expect the last invocation at least once. |
| public IExpectationSetters | |
| public IExpectationSetters | Returns: this object to allow method call chaining.the number of invocations expected count)Expect the last invocation |
| public IExpectationSetters | Returns: this object to allow method call chaining.the minimum number of invocations expected. min, int the maximum number of invocations expected. max)Expect the last invocation between |
| andAnswer | back to summary |
|---|---|
| public IExpectationSetters Sets an object that will be used to calculate the answer for the expected invocation (either return a value, or throw an exception).
| |
| andDelegateTo | back to summary |
|---|---|
| public IExpectationSetters Sets an object implementing the same interface as the mock. The expected method call will be delegated to it with the actual arguments. The answer returned by this call will then be the answer returned by the mock (either return a value, or throw an exception).
| |
| andReturn | back to summary |
|---|---|
| public IExpectationSetters Sets a return value that will be returned for the expected invocation.
| |
| andStubAnswer | back to summary |
|---|---|
| public void andStubAnswer(IAnswer<? extends T> answer) Sets a stub object that will be used to calculate the answer for the expected invocation (either return a value, or throw an exception).
| |
| andStubDelegateTo | back to summary |
|---|---|
| public void andStubDelegateTo(Object delegateTo) Sets a stub object implementing the same interface as the mock. The expected method call will be delegated to it with the actual arguments. The answer returned by this call will then be the answer returned by the mock (either return a value, or throw an exception).
| |
| andStubReturn | back to summary |
|---|---|
| public void andStubReturn(T value) Sets a stub return value that will be returned for the expected invocation.
| |
| andStubThrow | back to summary |
|---|---|
| public void andStubThrow(Throwable throwable) Sets a stub throwable that will be thrown for the expected invocation.
| |
| andThrow | back to summary |
|---|---|
| public IExpectationSetters Sets a throwable that will be thrown for the expected invocation.
| |
| andVoid | back to summary |
|---|---|
| public IExpectationSetters Records a call but returns nothing. Used to chain calls on void methods
| |
| anyTimes | back to summary |
|---|---|
| public IExpectationSetters Expect the last invocation any times.
| |
| asStub | back to summary |
|---|---|
| public void asStub() Sets stub behavior for the expected invocation (this is needed for void methods). | |
| atLeastOnce | back to summary |
|---|---|
| public IExpectationSetters Expect the last invocation at least once.
| |
| once | back to summary |
|---|---|
| public IExpectationSetters Expect the last invocation once. This is default in EasyMock.
| |
| times | back to summary |
|---|---|
| public IExpectationSetters Expect the last invocation
| |
| times | back to summary |
|---|---|
| public IExpectationSetters Expect the last invocation between
| |