/external/mockito/src/test/java/org/mockitousage/matchers/ |
D | MatchersTest.java | 70 when(mock.oneArg(and(eq(false), eq(false)))).thenReturn("0"); in and_overloaded() 71 when(mock.oneArg(and(eq((byte) 1), eq((byte) 1)))).thenReturn("1"); in and_overloaded() 72 when(mock.oneArg(and(eq('a'), eq('a')))).thenReturn("2"); in and_overloaded() 73 when(mock.oneArg(and(eq((double) 1), eq((double) 1)))).thenReturn("3"); in and_overloaded() 74 when(mock.oneArg(and(eq((float) 1), eq((float) 1)))).thenReturn("4"); in and_overloaded() 75 when(mock.oneArg(and(eq((int) 1), eq((int) 1)))).thenReturn("5"); in and_overloaded() 76 when(mock.oneArg(and(eq((long) 1), eq((long) 1)))).thenReturn("6"); in and_overloaded() 77 when(mock.oneArg(and(eq((short) 1), eq((short) 1)))).thenReturn("7"); in and_overloaded() 78 when(mock.oneArg(and(contains("a"), contains("d")))).thenReturn("8"); in and_overloaded() 79 when(mock.oneArg(and(isA(Class.class), eq(Object.class)))).thenReturn("9"); in and_overloaded() [all …]
|
D | AnyXMatchersAcceptNullsTest.java | 29 when(mock.oneArg((Object) any())).thenReturn("matched"); in shouldAcceptNullsInAnyMatcher() 36 when(mock.oneArg((Object) anyObject())).thenReturn("matched"); in shouldAcceptNullsInAnyObjectMatcher() 43 when(mock.oneArg(anyString())).thenReturn("0"); in shouldNotAcceptNullInAnyXMatchers() 44 when(mock.forList(anyListOf(String.class))).thenReturn("1"); in shouldNotAcceptNullInAnyXMatchers() 45 when(mock.forMap(anyMapOf(String.class, String.class))).thenReturn("2"); in shouldNotAcceptNullInAnyXMatchers() 46 when(mock.forCollection(anyCollectionOf(String.class))).thenReturn("3"); in shouldNotAcceptNullInAnyXMatchers() 47 when(mock.forSet(anySetOf(String.class))).thenReturn("4"); in shouldNotAcceptNullInAnyXMatchers() 59 when(mock.forInteger(anyInt())).thenReturn("0"); in shouldNotAcceptNullInAllAnyPrimitiveWrapperMatchers() 60 when(mock.forCharacter(anyChar())).thenReturn("1"); in shouldNotAcceptNullInAllAnyPrimitiveWrapperMatchers() 61 when(mock.forShort(anyShort())).thenReturn("2"); in shouldNotAcceptNullInAllAnyPrimitiveWrapperMatchers() [all …]
|
D | MoreMatchersTest.java | 27 when(mock.objectArgMethod(any(String.class))).thenReturn("string"); in should_help_out_with_unnecessary_casting() 63 when(mock.listArgMethod(anyListOf(String.class))).thenReturn("list"); in should_help_out_with_unnecessary_casting_of_lists() 73 when(mock.setArgMethod(anySetOf(String.class))).thenReturn("set"); in should_help_out_with_unnecessary_casting_of_sets() 83 when(mock.forMap(anyMapOf(String.class, String.class))).thenReturn("map"); in should_help_out_with_unnecessary_casting_of_maps() 93 when(mock.collectionArgMethod(anyCollectionOf(String.class))).thenReturn("collection"); in should_help_out_with_unnecessary_casting_of_collections() 103 when(mock.iterableArgMethod(anyIterableOf(String.class))).thenReturn("iterable"); in should_help_out_with_unnecessary_casting_of_iterables() 111 when(mock.objectArgMethod(isNull(LinkedList.class))).thenReturn("string"); in should_help_out_with_unnecessary_casting_of_nullity_checks() 112 when(mock.objectArgMethod(notNull(LinkedList.class))).thenReturn("string"); in should_help_out_with_unnecessary_casting_of_nullity_checks() 113 when(mock.objectArgMethod(isNotNull(LinkedList.class))).thenReturn("string"); in should_help_out_with_unnecessary_casting_of_nullity_checks()
|
D | CustomMatchersTest.java | 57 when(mock.oneArg(booleanThat(new IsAnyBoolean()))).thenReturn("foo"); in shouldUseCustomBooleanMatcher() 67 when(mock.oneArg(charThat(new IsSorZ()))).thenReturn("foo"); in shouldUseCustomCharMatcher() 96 when(mock.oneArg(byteThat(new IsZeroOrOne<Byte>()))).thenReturn("byte"); in shouldUseCustomPrimitiveNumberMatchers() 97 when(mock.oneArg(shortThat(new IsZeroOrOne<Short>()))).thenReturn("short"); in shouldUseCustomPrimitiveNumberMatchers() 98 when(mock.oneArg(intThat(new IsZeroOrOne<Integer>()))).thenReturn("int"); in shouldUseCustomPrimitiveNumberMatchers() 99 when(mock.oneArg(longThat(new IsZeroOrOne<Long>()))).thenReturn("long"); in shouldUseCustomPrimitiveNumberMatchers() 100 when(mock.oneArg(floatThat(new IsZeroOrOne<Float>()))).thenReturn("float"); in shouldUseCustomPrimitiveNumberMatchers() 101 when(mock.oneArg(doubleThat(new IsZeroOrOne<Double>()))).thenReturn("double"); in shouldUseCustomPrimitiveNumberMatchers() 116 when(mock.oneArg(argThat(new ContainsFoo()))).thenReturn("foo"); in shouldUseCustomObjectMatcher()
|
D | NewMatchersTest.java | 32 when(mock.forList(anyListOf(String.class))).thenReturn("matched"); in shouldAllowAnyList() 42 when(mock.forCollection(anyCollectionOf(String.class))).thenReturn("matched"); in shouldAllowAnyCollection() 52 when(mock.forMap(anyMapOf(String.class, String.class))).thenReturn("matched"); in shouldAllowAnyMap() 62 when(mock.forSet(anySetOf(String.class))).thenReturn("matched"); in shouldAllowAnySet() 72 when(mock.forIterable(anyIterableOf(String.class))).thenReturn("matched"); in shouldAllowAnyIterable()
|
/external/volley/src/test/java/com/android/volley/toolbox/ |
D | AndroidAuthenticatorTest.java | 55 … when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture); in failedGetAuthToken() 65 … when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture); in resultContainsIntent() 66 when(mFuture.getResult()).thenReturn(bundle); in resultContainsIntent() 67 when(mFuture.isDone()).thenReturn(true); in resultContainsIntent() 68 when(mFuture.isCancelled()).thenReturn(false); in resultContainsIntent() 75 … when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture); in missingAuthToken() 76 when(mFuture.getResult()).thenReturn(bundle); in missingAuthToken() 77 when(mFuture.isDone()).thenReturn(true); in missingAuthToken() 78 when(mFuture.isCancelled()).thenReturn(false); in missingAuthToken() 92 … when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture); in goodToken() [all …]
|
/external/mockito/src/test/java/org/mockitousage/internal/junit/ |
D | UnusedStubbingsFinderTest.java | 49 when(mock1.simpleMethod()).thenReturn("1"); in no_unused_stubbings() 60 when(mock1.simpleMethod()).thenReturn("1"); in unused_stubbings() 69 when(mock1.simpleMethod(1)).thenReturn("1"); in some_unused_stubbings() 70 when(mock2.simpleMethod(2)).thenReturn("2"); in some_unused_stubbings() 71 when(mock2.simpleMethod(3)).thenReturn("3"); in some_unused_stubbings() 86 when(mock1.simpleMethod(1)).thenReturn("1"); in some_unused_stubbings_by_location() 87 when(mock2.simpleMethod(2)).thenReturn("2"); in some_unused_stubbings_by_location() 88 when(mock2.simpleMethod(3)).thenReturn("3"); in some_unused_stubbings_by_location() 104 when(mock1.simpleMethod(1)).thenReturn("1"); when(mock2.simpleMethod(1)).thenReturn("1"); in stubbing_used_by_location() 118 when(mock1.simpleMethod(1)).thenReturn("1"); when(mock2.simpleMethod(1)).thenReturn("1"); in deduplicates_stubbings_by_location()
|
/external/mockito/src/test/java/org/mockitousage/stubbing/ |
D | DeepStubbingTest.java | 80 when(sf.createSocket(anyString(), eq(80))).thenReturn(null); in myTest() 88 when(socket.getOutputStream()).thenReturn(out); in simpleCase() 101 when(socketFactory.createSocket().getOutputStream()).thenReturn(out); in oneLevelDeep() 115 when(sf1.createSocket().getOutputStream()).thenReturn(out1); in interactions() 118 when(sf2.createSocket().getOutputStream()).thenReturn(out2); in interactions() 134 when(sf.createSocket().getOutputStream()).thenReturn(out1); in withArguments() 135 when(sf.createSocket("google.com", 80).getOutputStream()).thenReturn(out2); in withArguments() 136 when(sf.createSocket("stackoverflow.com", 80).getOutputStream()).thenReturn(out3); in withArguments() 152 when(sf.createSocket(anyString(), anyInt()).getOutputStream()).thenReturn(out); in withAnyPatternArguments() 167 when(sf.createSocket(anyString(), eq(80)).getOutputStream()).thenReturn(out1); in withComplexPatternArguments() [all …]
|
D | StubbingConsecutiveAnswersTest.java | 25 .thenReturn("one") in should_return_consecutive_values() 26 .thenReturn("two") in should_return_consecutive_values() 27 .thenReturn("three"); in should_return_consecutive_values() 38 when(mock.simpleMethod()).thenReturn(null, (String[]) null); in should_return_consecutive_values_for_two_nulls() 46 when(mock.simpleMethod()).thenReturn("one", "two", "three"); in should_return_consecutive_values_set_by_shorten_then_return_method() 57 when(mock.simpleMethod()).thenReturn("zero") in should_return_consecutive_value_and_throw_exceptions_set_by_shorten_return_methods() 58 .thenReturn("one", "two") in should_return_consecutive_value_and_throw_exceptions_set_by_shorten_return_methods() 60 .thenReturn("three") in should_return_consecutive_value_and_throw_exceptions_set_by_shorten_return_methods() 184 .thenReturn("one") in should_mix_consecutive_returns_with_excepions() 186 .thenReturn(null); in should_mix_consecutive_returns_with_excepions() [all …]
|
D | BasicStubbingTest.java | 32 when(mock.objectReturningMethod(isA(Integer.class))).thenReturn(100); in should_evaluate_latest_stubbing_first() 33 when(mock.objectReturningMethod(200)).thenReturn(200); in should_evaluate_latest_stubbing_first() 42 when(mock.booleanReturningMethod()).thenReturn(true); in should_stubbing_be_treated_as_interaction() 55 when(mockTwo.toString()).thenReturn("test"); in should_allow_stubbing_to_string() 73 when("").thenReturn(""); in unfinished_stubbing_cleans_up_the_state() 105 when(localMock.objectReturningMethod(isA(Integer.class))).thenReturn(100); in test_stub_only_not_verifiable() 106 when(localMock.objectReturningMethod(200)).thenReturn(200); in test_stub_only_not_verifiable()
|
/external/mockito/src/test/java/org/mockitousage/jls/ |
D | JLS_15_12_2_5Test.java | 53 when(mock.oneArg(isNull())).thenReturn("ok"); in with_single_arg() 65 when(mock.oneArg((String) isNull())).thenReturn("ok"); in with_single_arg_and_matcher_cast() 74 when(mock.oneArg(isNull())).thenReturn("ok"); in with_single_arg_and_null_Object_reference() 84 when(mock.varargs(isNull())).thenReturn("ok"); in with_variable_arg() 96 when(mock.varargs((String) isNull())).thenReturn("ok"); in with_variable_arg_and_matcher_String_cast() 105 when(mock.varargs((String[]) isNull())).thenReturn("ok"); in with_variable_arg_and_matcher_String_array_cast() 114 when(mock.varargs(isNull())).thenReturn("ok"); in with_variable_arg_and_null_Object_array() 124 when(mock.varargs(isNull())).thenReturn("ok"); in with_variable_arg_and_null_Object_arg() 187 when(mock.oneArg(isNull())).thenReturn("ok"); in with_single_arg() 196 when(mock.oneArg(isNull())).thenReturn("ok"); in with_single_arg_and_null_Object_reference() [all …]
|
/external/mockito/src/test/java/org/mockitousage/examples/use/ |
D | ExampleTest.java | 31 when(mockCalculator.countArticles("Guardian")).thenReturn(12); in managerCountsArticlesAndSavesThemInTheDatabase() 32 when(mockCalculator.countArticlesInPolish(anyString())).thenReturn(5); in managerCountsArticlesAndSavesThemInTheDatabase() 64 when(mockCalculator.countNumberOfRelatedArticles(articleOne)).thenReturn(1); in managerUpdatesNumberOfRelatedArticles() 65 when(mockCalculator.countNumberOfRelatedArticles(articleTwo)).thenReturn(12); in managerUpdatesNumberOfRelatedArticles() 66 when(mockCalculator.countNumberOfRelatedArticles(articleThree)).thenReturn(0); in managerUpdatesNumberOfRelatedArticles() 68 …when(mockDatabase.getArticlesFor("Guardian")).thenReturn(Arrays.asList(articleOne, articleTwo, art… in managerUpdatesNumberOfRelatedArticles() 82 when(mockCalculator.countNumberOfRelatedArticles(articleOne)).thenReturn(1); in shouldPersistRecalculatedArticle() 83 when(mockCalculator.countNumberOfRelatedArticles(articleTwo)).thenReturn(12); in shouldPersistRecalculatedArticle() 85 … when(mockDatabase.getArticlesFor("Guardian")).thenReturn(Arrays.asList(articleOne, articleTwo)); in shouldPersistRecalculatedArticle()
|
/external/mockito/src/test/java/org/mockito/internal/junit/ |
D | ArgMismatchFinderTest.java | 32 when(mock1.simpleMethod(1)).thenReturn("1"); in no_mismatch_when_mock_different() 45 when(mock1.simpleMethod(1)).thenReturn("1"); in no_mismatch_when_method_different() 58 when(mock1.simpleMethod(1)).thenReturn("1"); in no_mismatch_when_stubbing_used() 72 when(mock1.simpleMethod(1)).thenReturn("1"); in stubbing_mismatch() 85 when(mock1.simpleMethod(1)).thenReturn("1"); in single_mismatch_with_multiple_invocations() 100 when(mock1.simpleMethod(1)).thenReturn("1"); in single_invocation_with_multiple_stubs() 101 when(mock1.simpleMethod(2)).thenReturn("2"); in single_invocation_with_multiple_stubs() 116 when(mock1.simpleMethod(1)).thenReturn("1"); //unused in mismatch_reports_only_unstubbed_invocations() 117 when(mock1.simpleMethod(2)).thenReturn("2"); //used in mismatch_reports_only_unstubbed_invocations()
|
/external/conscrypt/openjdk/src/test/java/org/conscrypt/ |
D | MockSessionBuilder.java | 76 when(session.getId()).thenReturn(id); in build() 77 when(session.isValid()).thenReturn(valid); in build() 78 when(session.getProtocol()).thenReturn(protocol); in build() 79 when(session.getPeerHost()).thenReturn(host); in build() 80 when(session.getPeerPort()).thenReturn(port); in build() 81 when(session.getCipherSuite()).thenReturn(cipherSuite); in build() 82 when(session.toBytes()).thenReturn(encodedBytes); in build()
|
/external/mockito/src/test/java/org/concurrentmockito/ |
D | ThreadsShareGenerouslyStubbedMockTest.java | 32 .thenReturn("foo") in performTest() 33 .thenReturn("bar") in performTest() 34 .thenReturn("baz") in performTest() 35 .thenReturn("foo") in performTest() 36 .thenReturn("bar") in performTest() 37 .thenReturn("baz"); in performTest()
|
/external/mockito/src/test/java/org/mockitousage/bugs/ |
D | CompareMatcherTest.java | 37 when(mock.forInteger(leq(5))).thenReturn(""); in compareNullArgument() 47 when(mock.forObject(leq(5))).thenReturn(""); in compareToNonCompareable() 57 when(mock.forInteger(leq((Integer) null))).thenReturn(""); in compareToNull() 67 when(mock.forObject(startsWith("Hello"))).thenReturn(""); in compareToStringVsInt() 74 when(mock.forObject(leq(5))).thenReturn(""); in compareToIntVsString() 99 when(mock.forObject(argThat(new TestMatcher()))).thenReturn("x"); in matchesOverloadsMustBeIgnored() 113 when(mock.forObject(argThat(new TestMatcher()))).thenReturn("x"); in matchesWithSubTypeExtendingGenericClass() 126 when(mock.forObject(argThat(new GenericMatcher<Integer>()))).thenReturn("x"); in matchesWithSubTypeGenericMethod()
|
/external/dagger2/producers/src/test/java/dagger/producers/monitoring/internal/ |
D | MonitorsTest.java | 67 when(mockProductionComponentMonitorFactory.create(any(Object.class))).thenReturn(null); in singleMonitor_nullProductionComponentMonitor() 88 .thenReturn(mockProductionComponentMonitor); in singleMonitor_nullProducerMonitor() 90 .thenReturn(null); in singleMonitor_nullProducerMonitor() 102 .thenReturn(mockProductionComponentMonitor); in singleMonitor_throwingProductionComponentMonitor() 206 when(mockProductionComponentMonitorFactoryA.create(any(Object.class))).thenReturn(null); in multipleMonitors_nullProductionComponentMonitors() 207 when(mockProductionComponentMonitorFactoryB.create(any(Object.class))).thenReturn(null); in multipleMonitors_nullProductionComponentMonitors() 208 when(mockProductionComponentMonitorFactoryC.create(any(Object.class))).thenReturn(null); in multipleMonitors_nullProductionComponentMonitors() 241 .thenReturn(mockProductionComponentMonitorA); in multipleMonitors_someNullProductionComponentMonitors() 242 when(mockProductionComponentMonitorFactoryB.create(any(Object.class))).thenReturn(null); in multipleMonitors_someNullProductionComponentMonitors() 243 when(mockProductionComponentMonitorFactoryC.create(any(Object.class))).thenReturn(null); in multipleMonitors_someNullProductionComponentMonitors() [all …]
|
/external/mockito/src/test/java/org/mockitousage/basicapi/ |
D | UsingVarargsTest.java | 35 when(mock.withStringVarargsReturningString(1)).thenReturn("1"); in shouldStubStringVarargs() 36 when(mock.withStringVarargsReturningString(2, "1", "2", "3")).thenReturn("2"); in shouldStubStringVarargs() 62 when(mock.withBooleanVarargs(1)).thenReturn(true); in shouldStubBooleanVarargs() 63 when(mock.withBooleanVarargs(1, true, false)).thenReturn(true); in shouldStubBooleanVarargs() 147 when(mixedVarargs.doSomething("hello", (String[])null)).thenReturn("hello"); in shouldStubCorrectlyWhenMixedVarargsUsed() 148 when(mixedVarargs.doSomething("goodbye", (String[])null)).thenReturn("goodbye"); in shouldStubCorrectlyWhenMixedVarargsUsed() 160 when(mixedVarargs.doSomething("one", "two", (String[])null)).thenReturn("hello"); in shouldStubCorrectlyWhenDoubleStringAndMixedVarargsUsed() 161 when(mixedVarargs.doSomething("1", "2", (String[])null)).thenReturn("goodbye"); in shouldStubCorrectlyWhenDoubleStringAndMixedVarargsUsed() 171 when(mock.foo(anyVararg())).thenReturn(-1); in shouldMatchEasilyEmptyVararg()
|
D | MocksSerializationForAnnotationTest.java | 62 when(imethodsMock.booleanReturningMethod()).thenReturn(true); in should_allow_mock_and_boolean_value_to_serializable() 76 when(imethodsMock.stringReturningMethod()).thenReturn(value); in should_allow_mock_and_string_value_to_be_serializable() 90 when(imethodsMock.objectReturningMethodNoArgs()).thenReturn(value); in should_all_mock_and_serializable_value_to_be_serialized() 103 when(imethodsMock.objectArgMethod(value)).thenReturn(value); in should_serialize_method_call_with_parameters_that_are_serializable() 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() 186 when(imethodsMock.simpleMethod(1)).thenReturn("foo"); in should_stub_even_if_some_methods_called_after_serialization() 189 when(readObject.simpleMethod(2)).thenReturn("bar"); in should_stub_even_if_some_methods_called_after_serialization() 216 when(imethodsMock.objectArgMethod(anyString())).thenReturn(value); in should_remember_interactions_for_serialized_mock() 262 when(spy.size()).thenReturn(100); in should_serialize_with_real_object_spy() [all …]
|
D | MocksSerializationTest.java | 70 when(mock.booleanReturningMethod()).thenReturn(true); in should_allow_mock_and_boolean_value_to_serializable() 85 when(mock.stringReturningMethod()).thenReturn(value); in should_allow_mock_and_string_value_to_be_serializable() 100 when(mock.objectReturningMethodNoArgs()).thenReturn(value); in should_all_mock_and_serializable_value_to_be_serialized() 114 when(mock.objectArgMethod(value)).thenReturn(value); in should_serialize_method_call_with_parameters_that_are_serializable() 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() 203 when(mock.simpleMethod(1)).thenReturn("foo"); in should_stub_even_if_some_methods_called_after_serialization() 206 when(readObject.simpleMethod(2)).thenReturn("bar"); in should_stub_even_if_some_methods_called_after_serialization() 236 when(mock.objectArgMethod(anyString())).thenReturn(value); in should_remember_interactions_for_serialized_mock() 283 when(spy.size()).thenReturn(100); in should_serialize_with_real_object_spy() [all …]
|
/external/mockito/src/test/java/org/mockitousage/junitrunner/ |
D | StrictRunnerTest.java | 86 IMethods mock = when(mock(IMethods.class).simpleMethod(1)).thenReturn("1").getMock(); 101 when(mock.simpleMethod(1)).thenReturn("1"); in before() 110 when(mock.simpleMethod(1)).thenReturn("1"); in test() 119 when(mock.simpleMethod(1)).thenReturn("1"); in test() 133 when(mock2.simpleMethod("unused stubbing")).thenReturn(""); in before() 137 when(mock.simpleMethod(1)).thenReturn("1"); in passing_test() 153 when(mock.simpleMethod(1)).thenReturn("1"); in passing_test() 165 when(mock.simpleMethod(1)).thenReturn("1"); in passing_test()
|
D | StubbingWarningsJUnitRunnerTest.java | 64 when(mock.simpleMethod(1)).thenReturn("1"); in test() 73 when(mock.simpleMethod(1)).thenReturn("1"); in test() 83 when(mock.simpleMethod(1)).thenReturn("1"); in test() 93 when(mock.simpleMethod(1)).thenReturn("1"); // <- used in test() 94 when(mock.simpleMethod(2)).thenReturn("2"); // <- unused in test() 107 when(mock.simpleMethod(1)).thenReturn("1"); in test()
|
D | StrictStubsRunnerTest.java | 44 when(mock.simpleMethod()).thenReturn(""); in unused_stubbing_1() 47 when(mock.simpleMethod()).thenReturn(""); in unused_stubbing_2() 50 when(mock.simpleMethod()).thenReturn(""); in correct_stubbing() 60 when(mock.simpleMethod()).thenReturn(""); in passing2() 64 when(mock.simpleMethod(10)).thenReturn(""); in argument_mismatch()
|
/external/mockito/src/main/java/org/mockito/internal/stubbing/ |
D | BaseStubbing.java | 15 public OngoingStubbing<T> thenReturn(T value) { in thenReturn() method in BaseStubbing 20 public OngoingStubbing<T> thenReturn(T value, T... values) { in thenReturn() method in BaseStubbing 21 OngoingStubbing<T> stubbing = thenReturn(value); in thenReturn() 24 return stubbing.thenReturn(null); in thenReturn() 27 stubbing = stubbing.thenReturn(v); in thenReturn()
|
/external/mockito/src/test/java/org/mockitousage/serialization/ |
D | DeepStubsSerializableTest.java | 19 when(sampleClass.getSample().isFalse()).thenReturn(true); in should_serialize_and_deserialize_mock_created_with_deep_stubs() 20 when(sampleClass.getSample().number()).thenReturn(999); in should_serialize_and_deserialize_mock_created_with_deep_stubs() 34 when(deep_stubbed.iterator().next().add("yes")).thenReturn(true); in should_serialize_and_deserialize_parameterized_class_mocked_with_deep_stubs() 48 when(deep_stubbed.iterator().hasNext()).thenReturn(true); in should_discard_generics_metadata_when_serialized_then_disabling_deep_stubs_with_generics() 53 when(deserialized_deep_stub.iterator().next().get(42)).thenReturn("no"); in should_discard_generics_metadata_when_serialized_then_disabling_deep_stubs_with_generics()
|