/external/mockito/src/org/mockito/stubbing/ |
DeprecatedOngoingStubbing.java | 66 * Set a generic Answer for the stubbed method. E.g:
68 * stub(mock.someMethod(10)).toAnswer(new Answer<Integer>() {
69 * public Integer answer(InvocationOnMock invocation) throws Throwable {
75 * @param answer the custom answer to execute.
79 DeprecatedOngoingStubbing<T> toAnswer(Answer<?> answer);
|
VoidMethodStubbable.java | 70 * Stubs a void method with generic {@link Answer}
75 * .toAnswer(new Answer() {
76 * public Object answer(InvocationOnMOck invocation) {
86 * @param answer the custom answer to execute.
90 VoidMethodStubbable<T> toAnswer(Answer<?> answer);
|
Stubber.java | 32 * {@link Mockito#doAnswer(Answer)}
60 * {@link Mockito#doAnswer(Answer)}
103 * Use it for stubbing consecutive calls in {@link Mockito#doAnswer(Answer)} style:
109 * See javadoc for {@link Mockito#doAnswer(Answer)}
111 * @param answer to answer when the stubbed method is called
114 Stubber doAnswer(Answer answer);
|
/external/mockito/src/org/mockito/ |
BDDMockito.java | 7 import org.mockito.stubbing.Answer;
67 * See original {@link OngoingStubbing#thenAnswer(Answer)}
70 BDDMyOngoingStubbing<T> willAnswer(Answer<?> answer);
73 * See original {@link OngoingStubbing#then(Answer)}
76 BDDMyOngoingStubbing<T> will(Answer<?> answer);
124 * @see BDDMockito.BDDMyOngoingStubbing#willAnswer(Answer)
126 public BDDMyOngoingStubbing<T> willAnswer(Answer<?> answer) {
[all...] |
Mockito.java | 249 * This is because of improved readability and consistency with the family of {@link Mockito#doAnswer(Answer)} methods.
418 * Allows stubbing with generic {@link Answer} interface.
426 * when(mock.someMethod(anyString())).thenAnswer(new Answer() {
427 * Object answer(InvocationOnMock invocation) {
477 * {@link Mockito#doAnswer(Answer)}
528 * Therefore when using spies please consider <code>doReturn</code>|<code>Answer</code>|<code>Throw()</code> family of
565 * It is the default answer so it will be used <b>only when you don't</b> stub the method call.
573 * Read more about this interesting implementation of <i>Answer</i>: {@link Mockito#RETURNS_SMART_NULLS}
[all...] |
/external/mockito/src/org/mockito/internal/stubbing/ |
InvocationContainerImpl.java | 16 import org.mockito.stubbing.Answer; 29 private final List<Answer> answersForStubbing = new ArrayList<Answer>(); 48 public void addAnswer(Answer answer) { 50 addAnswer(answer, false); 53 public void addConsecutiveAnswer(Answer answer) { 54 addAnswer(answer, true); 57 public void addAnswer(Answer answer, boolean isConsecutive) [all...] |
VoidMethodStubbableImpl.java | 9 import org.mockito.stubbing.Answer;
31 public VoidMethodStubbable<T> toAnswer(Answer<?> answer) {
32 invocationContainerImpl.addAnswerForVoidMethod(answer);
|
/external/mockito/src/org/mockito/internal/stubbing/answers/ |
ClonesArguments.java | 10 import org.mockito.stubbing.Answer;
13 //TODO this needs documentation and further analysis - what if someone changes the answer?
15 public class ClonesArguments implements Answer<Object> {
16 public Object answer(InvocationOnMock invocation) throws Throwable {
method in class:ClonesArguments 24 return new ReturnsEmptyValues().answer(invocation);
|
ThrowsException.java | 10 import org.mockito.stubbing.Answer;
14 public class ThrowsException implements Answer<Object>, Serializable {
24 public Object answer(InvocationOnMock invocation) throws Throwable {
method in class:ThrowsException
|
ThrowsExceptionClass.java | 10 import org.mockito.stubbing.Answer; 15 public class ThrowsExceptionClass implements Answer<Object>, Serializable { 25 public Object answer(InvocationOnMock invocation) throws Throwable { method in class:ThrowsExceptionClass
|
ReturnsArgumentAt.java | 9 import org.mockito.stubbing.Answer; 22 public class ReturnsArgumentAt implements Answer<Object>, Serializable { 31 * Build the identity answer to return the argument at the given position in the argument array. 40 public Object answer(InvocationOnMock invocation) throws Throwable { method in class:ReturnsArgumentAt
|
AnswersValidator.java | 9 import org.mockito.stubbing.Answer;
15 public void validate(Answer<?> answer, Invocation invocation) {
17 if (answer instanceof ThrowsException) {
18 validateException((ThrowsException) answer, methodInfo);
21 if (answer instanceof Returns) {
22 validateReturnValue((Returns) answer, methodInfo);
25 if (answer instanceof DoesNothing) {
26 validateDoNothing((DoesNothing) answer, methodInfo);
29 if (answer instanceof CallsRealMethods) { [all...] |
/external/mockito/src/org/mockito/internal/creation/settings/ |
CreationSettings.java | 10 import org.mockito.stubbing.Answer; 28 protected Answer<Object> defaultAnswer; 75 public Answer<Object> getDefaultAnswer() {
|
/external/mockito/src/org/mockito/internal/configuration/ |
GlobalConfiguration.java | 11 import org.mockito.stubbing.Answer;
66 public Answer<Object> getDefaultAnswer() {
|
/external/mockito/src/org/mockito/internal/stubbing/defaultanswers/ |
ReturnsDeepStubs.java | 16 import org.mockito.stubbing.Answer;
27 * <p>Supports nested generic information, with this answer you can write code like this :
40 public class ReturnsDeepStubs implements Answer<Object>, Serializable {
47 public Object answer(InvocationOnMock invocation) throws Throwable {
method in class:ReturnsDeepStubs 66 return stubbedInvocationMatcher.answer(invocation);
79 * {@link ReturnsDeepStubs} answer in which we will store the returned type generic metadata.
112 container.addAnswer(new Answer<Object>() {
113 public Object answer(InvocationOnMock invocation) throws Throwable {
|
ReturnsEmptyValues.java | 13 import org.mockito.stubbing.Answer; 32 * Default answer of every Mockito mock. 54 public class ReturnsEmptyValues implements Answer<Object>, Serializable { 61 * @see org.mockito.stubbing.Answer#answer(org.mockito.invocation.InvocationOnMock) 63 public Object answer(InvocationOnMock invocation) { method in class:ReturnsEmptyValues
|
/external/mockito/src/org/mockito/internal/handler/ |
InvocationNotifierHandler.java | 15 import org.mockito.stubbing.Answer;
76 public void setAnswersForStubbing(List<Answer> answers) {
|
MockHandlerImpl.java | 18 import org.mockito.stubbing.Answer; 86 // look for existing answer for this invocation 91 return stubbedInvocation.answer(invocation); 93 Object ret = mockSettings.getDefaultAnswer().answer(invocation); 114 public void setAnswersForStubbing(List<Answer> answers) {
|
/external/mockito/src/org/mockito/internal/creation/ |
MockSettingsImpl.java | 18 import org.mockito.stubbing.Answer;
75 public MockSettings defaultAnswer(Answer defaultAnswer) {
83 public Answer<Object> getDefaultAnswer() {
|
/frameworks/base/tools/aidl/ |
options_test.cpp | 8 struct Answer { 57 test(const Answer& answer) 60 while (answer.argv[argc]) { 67 int result = parse_options(argc, answer.argv, &options); 70 if (((bool)result) != ((bool)answer.result)) { 72 answer.result << endl; 82 if (!match_arrays(answer.systemSearchPath, options.systemSearchPath)) { 86 print_array(" ", answer.systemSearchPath); 91 if (!match_arrays(answer.localSearchPath, options.localSearchPath)) [all...] |
/external/chromium_org/v8/test/mjsunit/ |
constant-folding.js | 212 // Answer is non-Smi so the subtraction is not folded in the code 219 // Answer is non-smi and lhs of << is a temporary heap number that we can 224 // Answer is non-smi and lhs of << is a temporary heap number that we think
|
/external/v8/test/mjsunit/ |
constant-folding.js | 212 // Answer is non-Smi so the subtraction is not folded in the code 219 // Answer is non-smi and lhs of << is a temporary heap number that we can 224 // Answer is non-smi and lhs of << is a temporary heap number that we think
|
/external/mockito/src/org/mockito/internal/ |
MockitoCore.java | 143 public Stubber doAnswer(Answer answer) {
146 return new StubberImpl().doAnswer(answer);
|
/external/robolectric/lib/test/ |
mockito-core-1.8.5.jar | |
/cts/suite/cts/deviceTests/browserbench/assets/octane/ |
deltablue.js | 171 * graph. Answer the constraint that this constraint overrides, if 391 * Answer true if this constraint is satisfied in the current solution. 685 * detected, remove the given constraint and answer 686 * false. Otherwise, answer true. 712 * downstream of the given constraint. Answer a collection of
|