Home
last modified time | relevance | path

Searched refs:ReturnsArgumentAt (Results 1 – 3 of 3) sorted by relevance

/external/mockito/src/test/java/org/mockito/internal/stubbing/answers/
DReturnsArgumentAtTest.java21 assertThat(new ReturnsArgumentAt(0).answer(invocationWith("A", "B"))).isEqualTo("A"); in should_be_able_to_return_the_first_parameter()
27 assertThat(new ReturnsArgumentAt(1).answer(invocationWith("A", "B", "C"))).isEqualTo("B"); in should_be_able_to_return_the_second_parameter()
32 assertThat(new ReturnsArgumentAt(-1).answer(invocationWith("A"))).isEqualTo("A"); in should_be_able_to_return_the_last_parameter()
33 assertThat(new ReturnsArgumentAt(-1).answer(invocationWith("A", "B"))).isEqualTo("B"); in should_be_able_to_return_the_last_parameter()
38 assertThat(new ReturnsArgumentAt(0).answer(invocationWith("A", "B", "C"))).isEqualTo("A"); in should_be_able_to_return_the_specified_parameter()
39 assertThat(new ReturnsArgumentAt(1).answer(invocationWith("A", "B", "C"))).isEqualTo("B"); in should_be_able_to_return_the_specified_parameter()
40 assertThat(new ReturnsArgumentAt(2).answer(invocationWith("A", "B", "C"))).isEqualTo("C"); in should_be_able_to_return_the_specified_parameter()
46 … new ReturnsArgumentAt(1).validateFor(new InvocationBuilder().method("varargsReturningString") in should_identify_bad_parameter_type_for_invocation()
53 new ReturnsArgumentAt(0).validateFor(new InvocationBuilder().method("oneArray") in should_identify_bad_parameter_type_for_invocation()
60 … new ReturnsArgumentAt(0).validateFor(new InvocationBuilder().method("mixedVarargsReturningString") in should_identify_bad_parameter_type_for_invocation()
[all …]
/external/mockito/src/main/java/org/mockito/
DAdditionalAnswers.java10 import org.mockito.internal.stubbing.answers.ReturnsArgumentAt;
86 return (Answer<T>) new ReturnsArgumentAt(0); in returnsFirstArg()
134 return (Answer<T>) new ReturnsArgumentAt(1); in returnsSecondArg()
182 return (Answer<T>) new ReturnsArgumentAt(ReturnsArgumentAt.LAST_ARGUMENT); in returnsLastArg()
231 return (Answer<T>) new ReturnsArgumentAt(position); in returnsArgAt()
/external/mockito/src/main/java/org/mockito/internal/stubbing/answers/
DReturnsArgumentAt.java31 public class ReturnsArgumentAt implements Answer<Object>, ValidableAnswer, Serializable { class
45 public ReturnsArgumentAt(int wantedArgumentPosition) { in ReturnsArgumentAt() method in ReturnsArgumentAt