/external/mockito/src/main/java/org/mockito/internal/creation/ |
D | MockSettingsImpl.java | 81 public MockSettings defaultAnswer(Answer defaultAnswer) { in defaultAnswer() argument 82 this.defaultAnswer = defaultAnswer; in defaultAnswer() 83 if (defaultAnswer == null) { in defaultAnswer() 90 return defaultAnswer; in getDefaultAnswer()
|
/external/mockito/src/main/java/org/mockito/ |
D | Mockito.java | 1639 .defaultAnswer(RETURNS_DEFAULTS)); in mock() 1677 public static <T> T mock(Class<T> classToMock, Answer defaultAnswer) { in mock() argument 1678 return mock(classToMock, withSettings().defaultAnswer(defaultAnswer)); in mock() 1790 .defaultAnswer(CALLS_REAL_METHODS)); in spy() 1824 .defaultAnswer(CALLS_REAL_METHODS)); in spy() 2711 return new MockSettingsImpl().defaultAnswer(RETURNS_DEFAULTS); in withSettings()
|
D | MockSettings.java | 143 MockSettings defaultAnswer(Answer defaultAnswer); in defaultAnswer() method
|
/external/mockito/src/test/java/org/mockitousage/constructor/ |
D | CreatingMocksWithConstructorTest.java | 37 …Message mock = mock(Message.class, withSettings().useConstructor().defaultAnswer(CALLS_REAL_METHOD… in can_create_mock_with_constructor() 44 …ge mock = mock(AbstractMessage.class, withSettings().useConstructor().defaultAnswer(CALLS_REAL_MET… in can_mock_abstract_classes() 56 …InnerClass.class, withSettings().useConstructor().outerInstance(this).defaultAnswer(CALLS_REAL_MET… in can_mock_inner_classes() 81 …nnerClass.class, withSettings().useConstructor().outerInstance("foo").defaultAnswer(CALLS_REAL_MET… in mocking_inner_classes_with_wrong_outer_instance() 139 List list = mock(List.class, withSettings().defaultAnswer(CALLS_REAL_METHODS)); in calls_real_interface_method()
|
/external/mockito/src/main/java/org/mockito/internal/creation/settings/ |
D | CreationSettings.java | 27 protected Answer<Object> defaultAnswer; field in CreationSettings 44 this.defaultAnswer = copy.defaultAnswer; in CreationSettings() 80 return defaultAnswer; in getDefaultAnswer()
|
/external/mockito/src/test/java/org/mockitousage/stubbing/ |
D | StubbingWithDelegateVarArgsTest.java | 28 .defaultAnswer(delegatesTo(new FooImpl()))); in should_not_fail_when_calling_varargs_method() 35 .defaultAnswer(delegatesTo(new FooImpl()))); in should_not_fail_when_calling_varargs_method_without_arguments() 43 .defaultAnswer(delegatesTo(new FooImpl()))); in should_not_fail_when_calling_varargs_method_with_null_argument()
|
/external/mockito/src/test/java/org/mockitousage/serialization/ |
D | DeepStubsSerializableTest.java | 18 …SampleClass sampleClass = mock(SampleClass.class, withSettings().defaultAnswer(RETURNS_DEEP_STUBS)… in should_serialize_and_deserialize_mock_created_with_deep_stubs() 33 …ListContainer deep_stubbed = mock(ListContainer.class, withSettings().defaultAnswer(RETURNS_DEEP_S… in should_serialize_and_deserialize_parameterized_class_mocked_with_deep_stubs() 47 …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/ |
D | MockitoConfiguration.java | 21 public void overrideDefaultAnswer(Answer<Object> defaultAnswer) { in overrideDefaultAnswer() argument 22 this.overriddenDefaultAnswer = defaultAnswer; in overrideDefaultAnswer()
|
/external/mockito/src/test/java/org/mockito/internal/handler/ |
D | MockHandlerFactoryTest.java | 32 …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/ |
D | SpyAnnotationEngine.java | 77 .defaultAnswer(CALLS_REAL_METHODS) in spyInstance() 83 MockSettings settings = withSettings().defaultAnswer(CALLS_REAL_METHODS) in spyNewInstance()
|
D | MockAnnotationProcessor.java | 32 mockSettings.defaultAnswer(annotation.answer()); in process()
|
/external/mockito/src/main/java/org/mockito/internal/stubbing/defaultanswers/ |
D | ReturnsMocks.java | 34 return mockitoCore.mock(clazz, new MockSettingsImpl().defaultAnswer(this)); in returnValueFor()
|
D | ReturnsDeepStubs.java | 108 .defaultAnswer(returnsDeepStubsAnswerUsing(returnTypeGenericMetadata)); in withSettingsUsing()
|
/external/mockito/src/main/java/org/mockito/internal/configuration/injection/ |
D | SpyOnInjectedFieldsHandler.java | 45 .defaultAnswer(Mockito.CALLS_REAL_METHODS) in processInjection()
|
/external/mockito/src/test/java/org/mockitousage/basicapi/ |
D | MocksCreationTest.java | 41 .defaultAnswer(RETURNS_SMART_NULLS) in shouldCombineMockNameAndSmartNulls()
|
D | MocksSerializationTest.java | 281 .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()
|
D | MocksSerializationForAnnotationTest.java | 260 .defaultAnswer(CALLS_REAL_METHODS) in should_serialize_with_real_object_spy()
|
/external/mockito/src/test/java/org/mockito/internal/util/ |
D | MockUtilTest.java | 61 …assertTrue(MockUtil.isSpy(Mockito.mock(ArrayList.class, withSettings().defaultAnswer(Mockito.CALLS… in should_validate_spy()
|
D | DefaultMockingDetailsTest.java | 43 …assertTrue(mockingDetails(mock(Gork.class, withSettings().defaultAnswer(Mockito.CALLS_REAL_METHODS… in should_know_spy()
|
/external/mockito/src/test/java/org/mockito/internal/creation/bytebuddy/ |
D | AbstractByteBuddyMockMakerTest.java | 177 mockSettings.defaultAnswer(new CallsRealMethods()); in settingsWithSuperCall()
|
D | InlineByteBuddyMockMakerTest.java | 262 mockSettings.defaultAnswer(new Returns("bar")); in settingsFor()
|