Home
last modified time | relevance | path

Searched defs:mock (Results 1 – 25 of 408) sorted by relevance

12345678910>>...17

/external/mockito-kotlin/tests/src/test/kotlin/test/
DBDDMockitoTest.kt13 val mock = mock<Methods>() in <lambda>() constant
25 val mock = mock<Methods>() in <lambda>() constant
37 val mock = mock<Methods>() in <lambda>() constant
49 val mock = mock<Methods>() in <lambda>() constant
61 val mock = mock<Methods>() in <lambda>() constant
73 val mock = mock<Methods>() in <lambda>() constant
85 val mock = mock<Methods>() in <lambda>() constant
97 val mock = mock<Methods>() in <lambda>() constant
112 val mock = mock<Methods>() in <lambda>() constant
122 val mock = mock<Methods>() in <lambda>() constant
DMockingTest.kt81 val mock = mock<Open>() { in testMockStubbing_lambda() constant
95 val mock = mock<Open>() { in testMockStubbing_normalOverridesLambda() constant
111 val mock = mock<Methods>(defaultAnswer = Mockito.RETURNS_SELF) in mock_withCustomDefaultAnswer_parameterName() constant
123 val mock = mock<Methods>( in mock_withSettingsAPI_extraInterfaces() constant
134 val mock = mock<Methods>(name = "myName") in mock_withSettingsAPI_name() constant
145 val mock = mock<Methods>(defaultAnswer = Mockito.RETURNS_MOCKS) in mock_withSettingsAPI_defaultAnswer() constant
157 val mock = mock<Methods>(serializable = true) in mock_withSettingsAPI_serializable() constant
166 val mock = mock<Methods>(serializableMode = BASIC) in mock_withSettingsAPI_serializableMode() constant
177 val mock = mock<Methods>(verboseLogging = true) in mock_withSettingsAPI_verboseLogging() constant
193 val mock = mock<Methods>(invocationListeners = arrayOf(InvocationListener { bool = true })) in mock_withSettingsAPI_invocationListeners() constant
[all …]
DStubberTest.kt12 val mock = mock<Methods>() in testDoAnswer() constant
23 val mock = mock<Open>() in testDoCallRealMethod() constant
44 val mock = mock<Methods>() in testDoReturnValue() constant
53 val mock = mock<Methods>() in testDoReturnNullValue() constant
62 val mock = mock<Methods>() in testDoReturnNullValues() constant
72 val mock = mock<Methods>() in testDoReturnValues() constant
82 val mock = mock<Open>() in testDoThrowClass() constant
95 val mock = mock<Open>() in testDoThrow() constant
DOngoingStubbingTest.kt19 val mock = mock<Open>() in <lambda>() constant
34 val mock = mock<Methods> { mock -> in <lambda>() constant
48 val mock = mock<Methods> { in <lambda>() constant
62 val mock = mock<Methods> { in <lambda>() constant
77 val mock = mock<Methods> { in <lambda>() constant
92 val mock = mock<Methods> { in <lambda>() constant
117 val mock = mock<Methods> { in <lambda>() constant
142 val mock = mock<Methods> { in <lambda>() constant
156 val mock = mock<Methods> { in <lambda>() constant
170 val mock = mock<Methods> { in <lambda>() constant
[all …]
/external/mockito/src/test/java/org/mockitousage/jls/
DJLS_15_12_2_5Test.java55 SingleOverload mock = mock(SingleOverload.class); in with_single_arg() local
67 SingleOverload mock = mock(SingleOverload.class); in with_single_arg_and_matcher_cast() local
76 SingleOverload mock = mock(SingleOverload.class); in with_single_arg_and_null_Object_reference() local
86 SingleOverload mock = mock(SingleOverload.class); in with_variable_arg() local
98 SingleOverload mock = mock(SingleOverload.class); in with_variable_arg_and_matcher_String_cast() local
107 SingleOverload mock = mock(SingleOverload.class); in with_variable_arg_and_matcher_String_array_cast() local
116 SingleOverload mock = mock(SingleOverload.class); in with_variable_arg_and_null_Object_array() local
126 SingleOverload mock = mock(SingleOverload.class); in with_variable_arg_and_null_Object_arg() local
189 SingleOverload mock = mock(SingleOverload.class); in with_single_arg() local
198 SingleOverload mock = mock(SingleOverload.class); in with_single_arg_and_null_Object_reference() local
[all …]
/external/cronet/third_party/googletest/src/googlemock/test/
Dgmock_link_test.h247 Mock mock; in TEST() local
255 Mock mock; in TEST() local
264 Mock mock; in TEST() local
272 Mock mock; in TEST() local
281 Mock mock; in TEST() local
290 Mock mock; in TEST() local
299 Mock mock; in TEST() local
312 Mock mock; in TEST() local
324 Mock mock; in TEST() local
336 Mock mock; in TEST() local
[all …]
/external/googletest/googlemock/test/
Dgmock_link_test.h248 Mock mock; in TEST() local
256 Mock mock; in TEST() local
265 Mock mock; in TEST() local
273 Mock mock; in TEST() local
282 Mock mock; in TEST() local
291 Mock mock; in TEST() local
300 Mock mock; in TEST() local
313 Mock mock; in TEST() local
325 Mock mock; in TEST() local
337 Mock mock; in TEST() local
[all …]
/external/mockito/src/test/java/org/mockito/internal/
DInvalidStateDetectionTest.java42 @Mock private IMethods mock; field in InvalidStateDetectionTest
170 void detect(IMethods mock); in detect()
175 public void detect(IMethods mock) { in detect()
182 public void detect(IMethods mock) { in detect()
189 public void detect(IMethods mock) { in detect()
196 public void detect(IMethods mock) { in detect()
203 public void detect(IMethods mock) { in detect()
210 public void detect(IMethods mock) { in detect()
216 public void detect(IMethods mock) { in detect()
223 public void detect(IMethods mock) { in detect()
[all …]
/external/mockito/src/main/java/org/mockito/internal/util/
DMockUtil.java35 T mock = mockMaker.createMock(settings, mockHandler); in createMock() local
45 public static <T> void resetMock(T mock) { in resetMock()
53 public static <T> MockHandler<T> getMockHandler(T mock) { in getMockHandler()
65 public static InvocationContainerImpl getInvocationContainer(Object mock) { in getInvocationContainer()
69 public static boolean isSpy(Object mock) { in isSpy()
73 public static boolean isMock(Object mock) { in isMock()
84 public static MockName getMockName(Object mock) { in getMockName()
88 public static void maybeRedefineMockName(Object mock, String newName) { in maybeRedefineMockName()
97 public static MockCreationSettings getMockSettings(Object mock) { in getMockSettings()
/external/mockito/src/test/java/org/mockitousage/basicapi/
DMocksSerializationTest.java41 Bar mock = mock(Bar.class, new ThrowsException(new RuntimeException())); in should_allow_throws_exception_to_be_serializable() local
60 IMethods mock = mock(IMethods.class, withSettings().serializable()); in should_allow_mock_to_be_serializable() local
69 IMethods mock = mock(IMethods.class, withSettings().serializable()); in should_allow_mock_and_boolean_value_to_serializable() local
83 IMethods mock = mock(IMethods.class, withSettings().serializable()); in should_allow_mock_and_string_value_to_be_serializable() local
98 IMethods mock = mock(IMethods.class, withSettings().serializable()); in should_all_mock_and_serializable_value_to_be_serialized() local
112 IMethods mock = mock(IMethods.class, withSettings().serializable()); in should_serialize_method_call_with_parameters_that_are_serializable() local
126 IMethods mock = mock(IMethods.class, withSettings().serializable()); in should_serialize_method_calls_using_any_string_matcher() local
140 IMethods mock = mock(IMethods.class, withSettings().serializable()); in should_verify_called_n_times_for_serialized_mock() local
156 IMethods mock = mock(IMethods.class, withSettings().serializable()); in should_verify_even_if_some_methods_called_after_serialization() local
200 IMethods mock = mock(IMethods.class, withSettings().serializable()); in should_stub_even_if_some_methods_called_after_serialization() local
[all …]
/external/mockito/src/test/java/org/mockitousage/junitrunner/
DStubbingWarningsJUnitRunnerTest.java66 IMethods mock = mock(IMethods.class); field in StubbingWarningsJUnitRunnerTest.PassingArgMismatch
75 @Mock IMethods mock; field in StubbingWarningsJUnitRunnerTest.FailingWithArgMismatch
85 @Mock IMethods mock; field in StubbingWarningsJUnitRunnerTest.FailingWithMatchingArgs
95 @Mock IMethods mock; field in StubbingWarningsJUnitRunnerTest.FailingWithSomeStubMismatches
109 @Mock IMethods mock; field in StubbingWarningsJUnitRunnerTest.MismatchButStubAlreadyUsed
121 @Mock IMethods mock; field in StubbingWarningsJUnitRunnerTest.InvalidMockitoUsage
DStrictRunnerTest.java90 IMethods mock = when(mock(IMethods.class).simpleMethod(1)).thenReturn("1").getMock(); field in StrictRunnerTest.StubbingInConstructorUnused
103 @Mock IMethods mock; field in StrictRunnerTest.StubbingInBeforeUnused
113 IMethods mock = mock(IMethods.class); in test() local
122 IMethods mock = mock(IMethods.class); in test() local
133 IMethods mock = mock(IMethods.class); field in StrictRunnerTest.WithUnrelatedAssertionFailure
154 IMethods mock = mock(IMethods.class); field in StrictRunnerTest.RunnerAndRule
165 IMethods mock = mock(IMethods.class); field in StrictRunnerTest.StubUsedFromDifferentThread
/external/mockito/src/test/java/org/mockitousage/stubbing/
DStubbingWithDelegateTest.java62 List<String> mock = mock(List.class, delegatesTo(delegatedList)); in when_not_stubbed_delegate_should_be_called() local
73 List<String> mock = mock(List.class, delegatesTo(delegatedList)); in when_stubbed_the_delegate_should_not_be_called() local
111 List<String> mock = mock(List.class, delegatesTo(new FakeList<String>())); in instance_of_different_class_can_be_called() local
119 List<String> mock = mock(List.class, delegatesTo(new FakeList<String>())); in method_with_subtype_return_can_be_called() local
127 List<String> mock = mock(List.class, delegatesTo(new FakeList<String>())); in calling_missing_method_should_throw_exception() local
139 List<String> mock = mock(List.class, delegatesTo(new FakeListWithWrongMethods<String>())); in calling_method_with_wrong_primitive_return_should_throw_exception() local
151 List<String> mock = mock(List.class, delegatesTo(new FakeListWithWrongMethods<String>())); in calling_method_with_wrong_reference_return_should_throw_exception() local
DStrictStubbingEndToEndTest.java82 @Mock IMethods mock; field in StrictStubbingEndToEndTest.UnnecessaryStubbing
96 @Mock IMethods mock; field in StrictStubbingEndToEndTest.ReportMismatchButNotUnusedStubbing
110 @Mock IMethods mock; field in StrictStubbingEndToEndTest.StrictStubsPassing
124 @Mock IMethods mock = Mockito.mock(IMethods.class); field in StrictStubbingEndToEndTest.LenientStrictness1
137 @Mock IMethods mock = Mockito.mock(IMethods.class); field in StrictStubbingEndToEndTest.LenientStrictness2
150 @Mock IMethods mock; field in StrictStubbingEndToEndTest.UnfinishedMocking
/external/mockito/src/test/java/org/mockitousage/session/
DMockitoSessionTest.java102 @Mock IMethods mock; field in MockitoSessionTest.SessionWithoutAnyConfiguration
118 @Mock IMethods mock; field in MockitoSessionTest.SessionWithoutInitMocksConfigured
132 @Mock IMethods mock; field in MockitoSessionTest.SessionWithoutStrictnessConfigured
146 @Mock IMethods mock; field in MockitoSessionTest.SessionWithIncorrectMockitoUsage
161 @Mock IMethods mock; field in MockitoSessionTest.SessionWithTestFailureAndIncorrectMockitoUsage
177 @Mock IMethods mock; field in MockitoSessionTest.SessionWithManuallyInitializedMock
193 @Mock IMethods mock; field in MockitoSessionTest.SessionWithUpdatedStrictness
212 @Mock IMethods mock; field in MockitoSessionTest.SessionWithOverriddenFailure
/external/mockito/src/test/java/org/mockito/internal/stubbing/defaultanswers/
DReturnsGenericDeepStubsTest.java37 GenericsNest<?> mock = mock(GenericsNest.class, RETURNS_DEEP_STUBS); in generic_deep_mock_frenzy__look_at_these_chained_calls() local
53 GenericsNest<?> mock = mock(GenericsNest.class, RETURNS_DEEP_STUBS); in can_create_mock_from_multiple_type_variable_bounds_when_return_type_of_parameterized_method_is_a_parameterizedtype_that_is_referencing_a_typevar_on_class() local
63 GenericsNest<?> mock = mock(GenericsNest.class, RETURNS_DEEP_STUBS); in can_create_mock_from_multiple_type_variable_bounds_when_method_return_type_is_referencing_a_typevar_on_class() local
71 GenericsNest<?> mock = mock(GenericsNest.class, RETURNS_DEEP_STUBS); in can_create_mock_from_multiple_type_variable_bounds_when_return_type_of_parameterized_method_is_a_typevar_that_is_referencing_a_typevar_on_class() local
79 GenericsNest<?> mock = mock(GenericsNest.class, RETURNS_DEEP_STUBS); in can_create_mock_from_return_types_declared_with_a_bounded_wildcard() local
88 GenericsNest<?> mock = mock(GenericsNest.class, RETURNS_DEEP_STUBS); in can_still_work_with_raw_type_in_the_return_type() local
107 GenericsNest<?> mock = mock(GenericsNest.class, RETURNS_DEEP_STUBS); in as_expected_fail_with_a_CCE_on_callsite_when_erasure_takes_place_for_example___StringBuilder_is_subject_to_erasure() local
/external/mockito/src/test/java/org/mockitousage/bugs/
DCovariantOverrideTest.java30 ReturnsObject mock = mock(ReturnsObject.class); in returnFoo1() local
37 ReturnsString mock = mock(ReturnsString.class); in returnFoo2() local
44 ReturnsObject mock = mock(ReturnsString.class); in returnFoo3() local
51 ReturnsString mock = mock(ReturnsString.class); in returnFoo4() local
/external/rust/crates/tokio-util/tests/
Dframed_read.rs16 macro_rules! mock { macro
72 let mock = mock! { in read_multi_frame_in_packet() localVariable
88 let mock = mock! { in read_multi_frame_across_packets() localVariable
106 let mock = mock! { in read_multi_frame_in_packet_after_codec_changed() localVariable
124 let mock = mock! { in read_not_ready() localVariable
142 let mock = mock! { in read_partial_then_not_ready() localVariable
161 let mock = mock! { in read_err() localVariable
180 let mock = mock! { in read_partial_then_err() localVariable
200 let mock = mock! { in read_partial_would_block_then_err() localVariable
294 let mock = mock! { in read_eof_then_resume() localVariable
/external/rust/crates/tokio-test/tests/
Dio.rs9 let mut mock = Builder::new().read(b"hello ").read(b"world!").build(); in read() localVariable
23 let mut mock = Builder::new() in read_error() localVariable
47 let mut mock = Builder::new().write(b"hello ").write(b"world!").build(); in write() localVariable
56 let mut mock = Builder::new() in write_error() localVariable
/external/mockito/src/test/java/org/mockito/internal/util/
DMockUtilTest.java27 List<?> mock = Mockito.mock(List.class); in should_get_handler() local
43 List<?> mock = Mockito.mock(List.class); in should_get_mock_settings() local
66 List<?> mock = Mockito.mock(List.class); in should_redefine_MockName_if_default() local
74 List<?> mock = Mockito.mock(List.class, "original"); in should_not_redefine_MockName_if_default() local
/external/mockito-kotlin/tests/src/test/kotlin/test/inline/
DUsingMockMakerInlineTest.kt64 val mock = mock<ClassToBeMocked>() in anyClosedClass() constant
76 val mock = mock<ClassToBeMocked> { in mockClosedFunction_mockStubbing() constant
90 val mock = mock<ClassToBeMocked>() in mockClosedFunction_whenever() constant
/external/guava/android/guava-tests/test/com/google/common/util/concurrent/
DWrappingExecutorServiceTest.java47 MockExecutor mock = new MockExecutor(); in testDelegations() local
63 MockExecutor mock = new MockExecutor(); in testExecute() local
71 MockExecutor mock = new MockExecutor(); in testSubmit() local
78 MockExecutor mock = new MockExecutor(); in testSubmit() local
85 MockExecutor mock = new MockExecutor(); in testSubmit() local
97 MockExecutor mock = new MockExecutor(); in testInvokeAll() local
104 MockExecutor mock = new MockExecutor(); in testInvokeAll() local
117 MockExecutor mock = new MockExecutor(); in testInvokeAny() local
124 MockExecutor mock = new MockExecutor(); in testInvokeAny() local
176 public TestExecutor(MockExecutor mock) { in TestExecutor()
/external/guava/guava-tests/test/com/google/common/util/concurrent/
DWrappingExecutorServiceTest.java47 MockExecutor mock = new MockExecutor(); in testDelegations() local
63 MockExecutor mock = new MockExecutor(); in testExecute() local
71 MockExecutor mock = new MockExecutor(); in testSubmit() local
78 MockExecutor mock = new MockExecutor(); in testSubmit() local
85 MockExecutor mock = new MockExecutor(); in testSubmit() local
97 MockExecutor mock = new MockExecutor(); in testInvokeAll() local
104 MockExecutor mock = new MockExecutor(); in testInvokeAll() local
117 MockExecutor mock = new MockExecutor(); in testInvokeAny() local
124 MockExecutor mock = new MockExecutor(); in testInvokeAny() local
176 public TestExecutor(MockExecutor mock) { in TestExecutor()
/external/libchrome/base/
Dgmock_unittest.cc68 MockSampleClass mock; in TEST() local
85 MockSampleClass mock; in TEST() local
96 MockSampleClass mock; in TEST() local
110 MockSampleClass mock; in TEST() local
124 MockSampleClass mock; in TEST() local
/external/mockito-kotlin/mockito-kotlin/src/main/kotlin/org/mockito/kotlin/
DMocking.kt53 inline fun <reified T : Any> mock( in mock() method
102 inline fun <reified T : Any> mock( in mock() method
200 inline fun <reified T : Any> mock(a: Answer<Any>): T = mock(defaultAnswer = a) method
207 inline fun <reified T : Any> mock(s: String): T = mock(name = s) method
211 inline fun <reified T : Any> mock(s: MockSettings): T = Mockito.mock(T::class.java, s)!! method

12345678910>>...17