Home | History | Annotate | Download | only in mockito

Lines Matching defs:ArgumentCaptor

22  *   ArgumentCaptor<Person> argument = ArgumentCaptor.forClass(Person.class);
30 * ArgumentCaptor<Person> varArgs = ArgumentCaptor.forClass(Person.class);
37 * <strong>Warning:</strong> it is recommended to use ArgumentCaptor with verification <strong>but not</strong> with stubbing.
38 * Using ArgumentCaptor with stubbing may decrease test readability because captor is created outside of assert (aka verify or 'then') block.
42 * In a way ArgumentCaptor is related to custom argument matchers (see javadoc for {@link ArgumentMatcher} class).
44 * However, ArgumentCaptor may be a better fit if:
62 public class ArgumentCaptor<T> {
68 private ArgumentCaptor(Class<? extends T> clazz) {
78 * See examples in javadoc for {@link ArgumentCaptor} class.
92 * See examples in javadoc for {@link ArgumentCaptor} class.
109 * ArgumentCaptor&lt;Person&gt; peopleCaptor = ArgumentCaptor.forClass(Person.class);
121 * ArgumentCaptor&lt;Person&gt; peopleCaptor = ArgumentCaptor.forClass(Person.class);
128 * See more examples in javadoc for {@link ArgumentCaptor} class.
137 * Build a new <code>ArgumentCaptor</code>.
139 * Note that an <code>ArgumentCaptor</code> <b>*don't do any type checks*</b>, it is only there to avoid casting
145 * @param <U> Type of object captured by the newly built ArgumentCaptor
146 * @return A new ArgumentCaptor
148 public static <U,S extends U> ArgumentCaptor<U> forClass(Class<S> clazz) {
149 return new ArgumentCaptor<U>(clazz);