Package org.mockito.stubbing.answers
Class ReturnsElementsOf
- java.lang.Object
-
- org.mockito.internal.stubbing.answers.ReturnsElementsOf
-
- org.mockito.stubbing.answers.ReturnsElementsOf
-
- All Implemented Interfaces:
Answer<java.lang.Object>
@Deprecated public class ReturnsElementsOf extends ReturnsElementsOf
Deprecated.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
Constructors Constructor Description ReturnsElementsOf(java.util.Collection<?> elements)
Deprecated.
-
Method Summary
-
Methods inherited from class org.mockito.internal.stubbing.answers.ReturnsElementsOf
answer
-
-