|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mockito.internal.stubbing.answers.ReturnsElementsOf
org.mockito.stubbing.answers.ReturnsElementsOf
AdditionalAnswers.returnsElementsOf(java.util.Collection>)
@Deprecated public class ReturnsElementsOf
Returns elements of the collection. Keeps returning the last element forever. Might be useful on occasion when you have a collection of elements to return.
//this:
when(mock.foo()).thenReturn(1, 2, 3);
//is equivalent to:
when(mock.foo()).thenReturn(new ReturnsElementsOf(Arrays.asList(1, 2, 3)));
| Constructor Summary | |
|---|---|
ReturnsElementsOf(java.util.Collection<?> elements)
Deprecated. |
|
| Method Summary |
|---|
| Methods inherited from class org.mockito.internal.stubbing.answers.ReturnsElementsOf |
|---|
answer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Deprecated public ReturnsElementsOf(java.util.Collection<?> elements)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||