Home
last modified time | relevance | path

Searched refs:defaultAnswer (Results 1 – 22 of 22) sorted by relevance

/external/mockito/src/test/java/org/mockitousage/constructor/
DCreatingMocksWithConstructorTest.java47 …Message mock = mock(Message.class, withSettings().useConstructor().defaultAnswer(CALLS_REAL_METHOD… in can_create_mock_with_constructor()
54 …ge mock = mock(AbstractMessage.class, withSettings().useConstructor().defaultAnswer(CALLS_REAL_MET… in can_mock_abstract_classes()
66 …= mock(AbstractMessage.class, withSettings().useConstructor("hello!").defaultAnswer(CALLS_REAL_MET… in can_spy_abstract_classes_with_constructor_args()
72 …e mock = mock(AbstractMessage.class, withSettings().useConstructor(7).defaultAnswer(CALLS_REAL_MET… in can_spy_abstract_classes_with_constructor_primitive_args()
78 …tractMessage.class, withSettings().useConstructor(new Object[]{null}).defaultAnswer(CALLS_REAL_MET… in can_spy_abstract_classes_with_constructor_array_of_nulls()
84 …k(AbstractMessage.class, withSettings().useConstructor((String) null).defaultAnswer(CALLS_REAL_MET… in can_spy_abstract_classes_with_casted_null()
91 …mock(AbstractMessage.class, withSettings().useConstructor(null).defaultAnswer(CALLS_REAL_METHODS)); in can_spy_abstract_classes_with_null_varargs()
101 …InnerClass.class, withSettings().useConstructor().outerInstance(this).defaultAnswer(CALLS_REAL_MET… in can_mock_inner_classes()
114 …mock(ThrowingConstructorClass.class, withSettings().useConstructor().defaultAnswer(CALLS_REAL_METH… in explains_constructor_exceptions()
159 …UsesBase u = mock(UsesBase.class, withSettings().useConstructor(new Base()).defaultAnswer(CALLS_RE… in can_mock_unambigous_constructor_with_inheritance_base_class_exact_match()
[all …]
/external/mockito/src/main/java/org/mockito/
DMockito.java1798 .defaultAnswer(RETURNS_DEFAULTS)); in mock()
1836 public static <T> T mock(Class<T> classToMock, Answer defaultAnswer) { in mock() argument
1837 return mock(classToMock, withSettings().defaultAnswer(defaultAnswer)); in mock()
1949 .defaultAnswer(CALLS_REAL_METHODS)); in spy()
1983 .defaultAnswer(CALLS_REAL_METHODS)); in spy()
2875 return new MockSettingsImpl().defaultAnswer(RETURNS_DEFAULTS); in withSettings()
DMockSettings.java147 MockSettings defaultAnswer(Answer defaultAnswer); in defaultAnswer() method
/external/mockito/src/main/java/org/mockito/internal/creation/
DMockSettingsImpl.java99 public MockSettings defaultAnswer(Answer defaultAnswer) { in defaultAnswer() method in MockSettingsImpl
100 this.defaultAnswer = defaultAnswer; in defaultAnswer()
101 if (defaultAnswer == null) { in defaultAnswer()
109 return defaultAnswer; in getDefaultAnswer()
/external/mockito/src/test/java/org/mockitousage/stubbing/
DStubbingWithDelegateVarArgsTest.java32 .defaultAnswer(delegatesTo(new FooImpl()))); in should_not_fail_when_calling_varargs_method()
39 .defaultAnswer(delegatesTo(new FooImpl()))); in should_not_fail_when_calling_varargs_method_without_arguments()
47 .defaultAnswer(delegatesTo(new FooImpl()))); in should_not_fail_when_calling_varargs_method_with_null_argument()
/external/mockito/src/main/java/org/mockito/internal/creation/settings/
DCreationSettings.java29 protected Answer<Object> defaultAnswer; field in CreationSettings
49 this.defaultAnswer = copy.defaultAnswer; in CreationSettings()
91 return defaultAnswer; in getDefaultAnswer()
/external/mockito/src/test/java/org/mockitousage/serialization/
DDeepStubsSerializableTest.java22 …SampleClass sampleClass = mock(SampleClass.class, withSettings().defaultAnswer(RETURNS_DEEP_STUBS)… in should_serialize_and_deserialize_mock_created_with_deep_stubs()
37 …ListContainer deep_stubbed = mock(ListContainer.class, withSettings().defaultAnswer(RETURNS_DEEP_S… in should_serialize_and_deserialize_parameterized_class_mocked_with_deep_stubs()
51 …ListContainer deep_stubbed = mock(ListContainer.class, withSettings().defaultAnswer(RETURNS_DEEP_S… in should_discard_generics_metadata_when_serialized_then_disabling_deep_stubs_with_generics()
/external/mockito/src/test/java/org/mockito/configuration/
DMockitoConfiguration.java21 public void overrideDefaultAnswer(Answer<Object> defaultAnswer) { in overrideDefaultAnswer() argument
22 this.overriddenDefaultAnswer = defaultAnswer; in overrideDefaultAnswer()
/external/mockito/src/test/java/org/mockito/internal/handler/
DMockHandlerFactoryTest.java32 …ttings<?> settings = (MockCreationSettings<?>) new MockSettingsImpl().defaultAnswer(new Returns(nu… in handle_result_must_not_be_null_for_primitives()
50 …ttings<?> settings = (MockCreationSettings<?>) new MockSettingsImpl().defaultAnswer(new Returns(12… in valid_handle_result_is_permitted()
/external/mockito/src/main/java/org/mockito/internal/configuration/
DSpyAnnotationEngine.java77 .defaultAnswer(CALLS_REAL_METHODS) in spyInstance()
83 MockSettings settings = withSettings().defaultAnswer(CALLS_REAL_METHODS) in spyNewInstance()
DMockAnnotationProcessor.java35 mockSettings.defaultAnswer(annotation.answer()); in process()
/external/mockito/src/test/java/org/mockito/internal/creation/bytebuddy/
DInlineByteBuddyMockMakerTest.java158 mockSettings.defaultAnswer(new Returns(10)); in should_mock_interface()
168 mockSettings.defaultAnswer(new Returns("foo")); in should_mock_interface_to_string()
293 mockSettings.defaultAnswer(new Returns("bar")); in settingsFor()
DAbstractByteBuddyMockMakerTest.java180 mockSettings.defaultAnswer(new CallsRealMethods()); in settingsWithSuperCall()
/external/mockito/src/main/java/org/mockito/internal/stubbing/defaultanswers/
DReturnsMocks.java34 return mockitoCore.mock(clazz, new MockSettingsImpl().defaultAnswer(this)); in returnValueFor()
DReturnsDeepStubs.java108 .defaultAnswer(returnsDeepStubsAnswerUsing(returnTypeGenericMetadata)); in withSettingsUsing()
/external/mockito/src/main/java/org/mockito/internal/configuration/injection/
DSpyOnInjectedFieldsHandler.java45 .defaultAnswer(Mockito.CALLS_REAL_METHODS) in processInjection()
/external/mockito/src/test/java/org/mockitousage/basicapi/
DMocksCreationTest.java37 .defaultAnswer(RETURNS_SMART_NULLS) in shouldCombineMockNameAndSmartNulls()
DMocksSerializationTest.java281 .defaultAnswer(CALLS_REAL_METHODS) in should_serialize_with_real_object_spy()
390 …IMethods iMethods = mock(IMethods.class, withSettings().serializable().defaultAnswer(RETURNS_DEEP_… in BUG_ISSUE_399_try_some_mocks_with_current_answers()
DMocksSerializationForAnnotationTest.java260 .defaultAnswer(CALLS_REAL_METHODS) in should_serialize_with_real_object_spy()
/external/mockito/src/test/java/org/mockito/internal/util/
DMockUtilTest.java61 …assertTrue(MockUtil.isSpy(Mockito.mock(ArrayList.class, withSettings().defaultAnswer(Mockito.CALLS… in should_validate_spy()
DDefaultMockingDetailsTest.java55 …assertTrue(mockingDetails(mock(Gork.class, withSettings().defaultAnswer(Mockito.CALLS_REAL_METHODS… in should_know_spy()
/external/pdfium/fxjs/xfa/
Dcjx_hostpseudomodel.cpp336 WideString defaultAnswer; in response() local
338 defaultAnswer = runtime->ToWideString(params[2]); in response()
345 pNotify->GetAppProvider()->Response(question, title, defaultAnswer, mark); in response()