/external/mockito/src/test/java/org/mockitousage/stubbing/ |
D | StubbingWithAdditionalAnswersTest.java | 17 import static org.mockito.BDDMockito.anyString; 48 … given(iMethods.threeArgumentMethod(eq(0), anyObject(), anyString())).will(returnsSecondArg()); in can_return_arguments_of_invocation() 49 given(iMethods.threeArgumentMethod(eq(1), anyObject(), anyString())).will(returnsLastArg()); in can_return_arguments_of_invocation() 74 given(iMethods.simpleMethod(anyString())) in can_return_based_on_strongly_types_one_parameter_function() 88 given(iMethods.simpleMethod(anyString())) in will_execute_a_void_based_on_strongly_typed_one_parameter_function() 104 given(iMethods.simpleMethod(anyString(), anyInt())) in can_return_based_on_strongly_typed_two_parameter_function() 118 given(iMethods.simpleMethod(anyString(), anyInt())) in will_execute_a_void_based_on_strongly_typed_two_parameter_function() 135 given(iMethods.threeArgumentMethodWithStrings(anyInt(), anyString(), anyString())) in can_return_based_on_strongly_typed_three_parameter_function() 151 given(iMethods.threeArgumentMethodWithStrings(anyInt(), anyString(), anyString())) in will_execute_a_void_based_on_strongly_typed_three_parameter_function() 168 given(iMethods.fourArgumentMethod(anyInt(), anyString(), anyString(), any(boolean[].class))) in can_return_based_on_strongly_typed_four_parameter_function() [all …]
|
D | DeepStubbingTest.java | 80 when(sf.createSocket(anyString(), eq(80))).thenReturn(null); in myTest() 152 when(sf.createSocket(anyString(), anyInt()).getOutputStream()).thenReturn(out); in withAnyPatternArguments() 167 when(sf.createSocket(anyString(), eq(80)).getOutputStream()).thenReturn(out1); in withComplexPatternArguments() 168 when(sf.createSocket(anyString(), eq(8080)).getOutputStream()).thenReturn(out2); in withComplexPatternArguments() 237 verify(person.getAddress(anyString())).getStreet(); in verification_work_with_argument_Matchers_in_nested_calls() 238 verify(person.getAddress(anyString()).getStreet(Locale.CHINESE), never()).getName(); in verification_work_with_argument_Matchers_in_nested_calls() 239 verify(person.getAddress(anyString()).getStreet(eq(Locale.ITALIAN))).getName(); in verification_work_with_argument_Matchers_in_nested_calls() 244 when(person.getAddress(anyString()).getStreet().getName()).thenReturn("deep"); in deep_stub_return_same_mock_instance_if_invocation_matchers_matches() 248 …assertSame(person.getAddress("the docks").getStreet(), person.getAddress(anyString()).getStreet()); in deep_stub_return_same_mock_instance_if_invocation_matchers_matches() 249 …assertSame(person.getAddress(anyString()).getStreet(), person.getAddress(anyString()).getStreet()); in deep_stub_return_same_mock_instance_if_invocation_matchers_matches() [all …]
|
D | StubbingWithCustomAnswerTest.java | 26 when(mock.simpleMethod(anyString())).thenAnswer(new Answer<String>() { in shouldAnswer() 104 when(mock.simpleMethod(anyString())).thenAnswer(new Answer<String>() { in shouldMakeSureTheInterfaceDoesNotChange()
|
D | CallingRealMethodTest.java | 54 doCallRealMethod().when(mock).setValue(anyString()); in shouldExecuteRealMethod()
|
D | StubbingWithDelegateTest.java | 89 doReturn(false).when(mockedList).add(Mockito.anyString()); in delegate_should_not_be_called_when_stubbed2()
|
/external/mockito/src/test/java/org/mockitousage/bugs/varargs/ |
D | VarargsAndAnyObjectPicksUpExtraInvocationsTest.java | 31 verify(table, times(2)).newRow(anyString(), (String[]) anyVararg()); in shouldVerifyCorrectlyWithAnyVarargs() 51 verify(table).newRow(anyString(), eq("foo"), anyString(), anyString()); in shouldVerifyCorrectlyNumberOfInvocationsWithVarargs() 52 verify(table).newRow(anyString(), anyString()); in shouldVerifyCorrectlyNumberOfInvocationsWithVarargs()
|
D | VarargsNotPlayingWithAnyObjectTest.java | 29 verify(mock).run(anyString(), anyString()); in shouldMatchAnyVararg() 35 verify(mock, never()).run(anyString(), eq("f")); in shouldMatchAnyVararg()
|
D | VarargsErrorWhenCallingRealMethodTest.java | 26 when(foo.blah(anyString(), anyString())).thenCallRealMethod(); in shouldNotThrowAnyException()
|
/external/mockito/src/test/java/org/mockito/internal/configuration/plugins/ |
D | PluginFinderTest.java | 19 import static org.mockito.Matchers.anyString; 80 when(switcher.isEnabled(anyString())).thenReturn(true); in multiple_implementations_only_one_useful() 92 when(switcher.isEnabled(anyString())).thenReturn(true); in multiple_empty_implementations() 102 when(switcher.isEnabled(anyString())).thenThrow(new RuntimeException("Boo!")); in problems_loading_impl()
|
/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/ |
D | EditTextTest.java | 46 String input = anyString(); in givenInitializingWithAttributeSet_whenMaxLengthNotDefined_thenTextLengthShouldHaveNoRestrictions() 56 String input = anyString(); in whenInitializingWithoutAttributeSet_thenTextLengthShouldHaveNoRestrictions() 63 private String anyString() { in anyString() method in EditTextTest
|
/external/mockito/src/test/java/org/mockitousage/matchers/ |
D | MatchersMixedWithRawArgumentsTest.java | 15 import static org.mockito.Matchers.anyString; 41 verify(mock).varargs("1", anyString(), "3"); in shouldAllowMixingRawArgumentsWithMatchers()
|
D | VerificationAndStubbingUsingMatchersTest.java | 33 when(two.simpleMethod(anyString())).thenReturn("any"); in shouldStubUsingMatchers()
|
D | AnyXMatchersAcceptNullsTest.java | 43 when(mock.oneArg(anyString())).thenReturn("0"); in shouldNotAcceptNullInAnyXMatchers()
|
/external/volley/src/test/java/com/android/volley/toolbox/ |
D | ImageLoaderTest.java | 47 when(mImageCache.getBitmap(anyString())).thenReturn(null); in isCachedChecksCache() 55 when(mImageCache.getBitmap(anyString())).thenReturn(bitmap); in getWithCacheHit() 63 when(mImageCache.getBitmap(anyString())).thenReturn(null); in getWithCacheMiss()
|
/external/mockito/src/test/java/org/mockitousage/bugs/ |
D | IOOBExceptionShouldNotBeThrownWhenNotCodingFluentlyTest.java | 15 import static org.mockito.Matchers.anyString; 27 OngoingStubbing<String> mapOngoingStubbing = when(map.get(anyString())); in second_stubbing_throws_IndexOutOfBoundsException()
|
D | AIOOBExceptionWithAtLeastTest.java | 30 verify(progressMonitor).beginTask(anyString(), anyInt()); in testCompleteProgress()
|
/external/mockito/src/test/java/org/mockitousage/verification/ |
D | AtLeastXVerificationTest.java | 36 verify(mock, atLeast(1)).add(anyString()); in shouldFailVerifiationAtLeastXTimes() 39 verify(mock, atLeast(2)).add(anyString()); in shouldFailVerifiationAtLeastXTimes()
|
D | AtMostXVerificationTest.java | 44 verify(mock, atMost(5)).add(anyString()); in shouldWorkWithArgumentMatchers() 47 verify(mock, atMost(0)).add(anyString()); in shouldWorkWithArgumentMatchers()
|
/external/mockito/src/test/java/org/mockitousage/basicapi/ |
D | MocksSerializationTest.java | 128 when(mock.objectArgMethod(anyString())).thenReturn(value); in should_serialize_method_calls_using_any_string_matcher() 142 when(mock.objectArgMethod(anyString())).thenReturn(value); in should_verify_called_n_times_for_serialized_mock() 236 when(mock.objectArgMethod(anyString())).thenReturn(value); in should_remember_interactions_for_serialized_mock() 255 when(mock.objectArgMethod(anyString())).thenAnswer(answer); in should_serialize_with_stubbing_callback() 392 …when(iMethods.iMethodsReturningMethod().linkedListReturningMethod().contains(anyString())).thenRet… in BUG_ISSUE_399_try_some_mocks_with_current_answers()
|
D | MocksSerializationForAnnotationTest.java | 116 when(imethodsMock.objectArgMethod(anyString())).thenReturn(value); in should_serialize_method_calls_using_any_string_matcher() 129 when(imethodsMock.objectArgMethod(anyString())).thenReturn(value); in should_verify_called_n_times_for_serialized_mock() 216 when(imethodsMock.objectArgMethod(anyString())).thenReturn(value); in should_remember_interactions_for_serialized_mock() 234 when(imethodsMock.objectArgMethod(anyString())).thenAnswer(answer); in should_serialize_with_stubbing_callback()
|
/external/mockito/src/test/java/org/mockitousage/customization/ |
D | BDDMockitoTest.java | 76 given(mock.simpleMethod(anyString())).willAnswer(new Answer<String>() { in should_stub_with_answer() 87 given(mock.simpleMethod(anyString())).will(new Answer<String>() { in should_stub_with_will_answer_alias() 98 given(mock.simpleMethod(anyString())) in should_stub_consecutively() 204 .given(mock).simpleMethod(anyString()); in should_stub_using_do_answer_style()
|
/external/mockito/src/test/java/org/mockitousage/spies/ |
D | StubbingSpiesDoesNotYieldNPETest.java | 37 spy.len(anyString()); in shouldNotThrowNPE()
|
/external/mockito/src/test/java/org/mockitousage/stacktrace/ |
D | ClickableStackTracesWhenFrameworkMisusedTest.java | 31 anyString(); in misplacedArgumentMatcherHere()
|
/external/mockito/src/test/java/org/mockitousage/examples/use/ |
D | ExampleTest.java | 32 when(mockCalculator.countArticlesInPolish(anyString())).thenReturn(5); in managerCountsArticlesAndSavesThemInTheDatabase()
|
/external/mockito/src/main/java/org/mockito/ |
D | ArgumentMatchers.java | 465 public static String anyString() { in anyString() method in ArgumentMatchers
|