/external/mockito/src/main/java/org/mockito/internal/configuration/ |
D | MockAnnotationProcessor.java | 23 MockSettings mockSettings = Mockito.withSettings(); in processAnnotationForMock() local 25 mockSettings.extraInterfaces(annotation.extraInterfaces()); in processAnnotationForMock() 28 mockSettings.name(name); in processAnnotationForMock() 30 mockSettings.name(annotation.name()); in processAnnotationForMock() 33 mockSettings.serializable(); in processAnnotationForMock() 36 mockSettings.stubOnly(); in processAnnotationForMock() 40 mockSettings.defaultAnswer(annotation.answer()); in processAnnotationForMock() 41 return Mockito.mock(type, mockSettings); in processAnnotationForMock()
|
/external/mockito/src/test/java/org/mockito/internal/creation/bytebuddy/ |
D | AbstractByteBuddyMockMakerTest.java | 158 MockSettingsImpl<T> mockSettings = new MockSettingsImpl<T>(); in settingsFor() local 159 mockSettings.setTypeToMock(type); in settingsFor() 160 if(extraInterfaces.length > 0) mockSettings.extraInterfaces(extraInterfaces); in settingsFor() 161 return mockSettings; in settingsFor() 165 MockSettingsImpl<T> mockSettings = new MockSettingsImpl<T>(); in serializableSettingsFor() local 166 mockSettings.serializable(serializableMode); in serializableSettingsFor() 167 mockSettings.setTypeToMock(type); in serializableSettingsFor() 168 return mockSettings; in serializableSettingsFor() 172 MockSettingsImpl<T> mockSettings = new MockSettingsImpl<T>(); in settingsWithConstructorFor() local 173 mockSettings.setTypeToMock(type); in settingsWithConstructorFor() [all …]
|
D | SubclassByteBuddyMockMakerTest.java | 57 … MockSettingsImpl<ClassWithAnnotation> mockSettings = new MockSettingsImpl<ClassWithAnnotation>(); in mock_type_with_annotations() local 58 mockSettings.setTypeToMock(ClassWithAnnotation.class); in mock_type_with_annotations() 60 ClassWithAnnotation proxy = mockMaker.createMock(mockSettings, dummyHandler()); in mock_type_with_annotations() 71 … MockSettingsImpl<ClassWithAnnotation> mockSettings = new MockSettingsImpl<ClassWithAnnotation>(); in mock_type_without_annotations() local 72 mockSettings.setTypeToMock(ClassWithAnnotation.class); in mock_type_without_annotations() 73 mockSettings.withoutAnnotations(); in mock_type_without_annotations() 75 ClassWithAnnotation proxy = mockMaker.createMock(mockSettings, dummyHandler()); in mock_type_without_annotations()
|
D | InlineByteBuddyMockMakerTest.java | 160 MockSettingsImpl<Set> mockSettings = new MockSettingsImpl<Set>(); in should_mock_interface() local 161 mockSettings.setTypeToMock(Set.class); in should_mock_interface() 162 mockSettings.defaultAnswer(new Returns(10)); in should_mock_interface() 163 Set<?> proxy = mockMaker.createMock(mockSettings, new MockHandlerImpl<Set>(mockSettings)); in should_mock_interface() 170 MockSettingsImpl<Set> mockSettings = new MockSettingsImpl<Set>(); in should_mock_interface_to_string() local 171 mockSettings.setTypeToMock(Set.class); in should_mock_interface_to_string() 172 mockSettings.defaultAnswer(new Returns("foo")); in should_mock_interface_to_string() 173 Set<?> proxy = mockMaker.createMock(mockSettings, new MockHandlerImpl<Set>(mockSettings)); in should_mock_interface_to_string() 326 MockSettingsImpl<T> mockSettings = new MockSettingsImpl<T>(); in settingsFor() local 327 mockSettings.setTypeToMock(type); in settingsFor() [all …]
|
/external/mockito/src/main/java/org/mockito/internal/handler/ |
D | MockHandlerImpl.java | 38 private final MockCreationSettings<T> mockSettings; field in MockHandlerImpl 40 public MockHandlerImpl(MockCreationSettings<T> mockSettings) { in MockHandlerImpl() argument 41 this.mockSettings = mockSettings; in MockHandlerImpl() 44 this.invocationContainer = new InvocationContainerImpl(mockSettings); in MockHandlerImpl() 90 (CreationSettings) mockSettings); in handle() 103 Object ret = mockSettings.getDefaultAnswer().answer(invocation); in handle() 117 return mockSettings; in getMockSettings()
|
/external/mockito/src/main/java/org/mockito/internal/listeners/ |
D | StubbingLookupNotifier.java | 33 final private MockCreationSettings mockSettings; field in StubbingLookupNotifier.Event 38 MockCreationSettings mockSettings) { in Event() argument 42 this.mockSettings = mockSettings; in Event() 62 return mockSettings; in getMockSettings()
|
/external/mockito/src/main/java/org/mockito/internal/stubbing/defaultanswers/ |
D | ReturnsDeepStubs.java | 103 MockSettings mockSettings = returnTypeGenericMetadata.hasRawExtraInterfaces() ? in withSettingsUsing() local 107 return propagateSerializationSettings(mockSettings, parentMockSettings) in withSettingsUsing() 111 …private MockSettings propagateSerializationSettings(MockSettings mockSettings, MockCreationSetting… in propagateSerializationSettings() argument 112 return mockSettings.serializable(parentMockSettings.getSerializableMode()); in propagateSerializationSettings() 125 …CreationSettings mockSettings = (CreationSettings) MockUtil.getMockHandler(mock).getMockSettings(); in actualParameterizedType() local 126 return GenericMetadataSupport.inferFrom(mockSettings.getTypeToMock()); in actualParameterizedType()
|
/external/mockito/src/main/java/org/mockito/internal/stubbing/ |
D | InvocationContainerImpl.java | 39 public InvocationContainerImpl(MockCreationSettings mockSettings) { in InvocationContainerImpl() argument 40 this.registeredInvocations = createRegisteredInvocations(mockSettings); in InvocationContainerImpl() 41 this.mockStrictness = mockSettings.isLenient() ? Strictness.LENIENT : null; in InvocationContainerImpl() 164 private RegisteredInvocations createRegisteredInvocations(MockCreationSettings mockSettings) { in createRegisteredInvocations() argument 165 return mockSettings.isStubOnly() in createRegisteredInvocations()
|
D | StrictnessSelector.java | 28 …trictness determineStrictness(Stubbing stubbing, MockCreationSettings mockSettings, Strictness tes… in determineStrictness() argument 33 if (mockSettings.isLenient()) { in determineStrictness()
|
/external/mockito/src/main/java/org/mockito/internal/util/ |
D | MockUtil.java | 91 MockCreationSettings mockSettings = getMockHandler(mock).getMockSettings(); in maybeRedefineMockName() local 92 if (mockName.isDefault() && mockSettings instanceof CreationSettings) { in maybeRedefineMockName() 93 ((CreationSettings) mockSettings).setMockName(new MockNameImpl(newName)); in maybeRedefineMockName()
|
/external/mockito/src/test/java/org/mockito/internal/handler/ |
D | MockHandlerImplTest.java | 81 MockSettingsImpl mockSettings = mock(MockSettingsImpl.class); in should_report_bogus_default_answer() local 82 MockHandlerImpl<?> handler = new MockHandlerImpl(mockSettings); in should_report_bogus_default_answer() 83 given(mockSettings.getDefaultAnswer()).willReturn(new Returns(AWrongType.WRONG_TYPE)); in should_report_bogus_default_answer()
|
/external/mockito/src/main/java/org/mockito/internal/creation/bytebuddy/ |
D | ByteBuddyCrossClassLoaderSerializationSupport.java | 182 MockCreationSettings<?> mockSettings = MockUtil.getMockSettings(mockitoMock); in CrossClassLoaderSerializationProxy() local 184 this.typeToMock = mockSettings.getTypeToMock(); in CrossClassLoaderSerializationProxy() 185 this.extraInterfaces = mockSettings.getExtraInterfaces(); in CrossClassLoaderSerializationProxy()
|
/external/mockito/src/main/java/org/mockito/ |
D | Mockito.java | 1904 public static <T> T mock(Class<T> classToMock, MockSettings mockSettings) { in mock() argument 1905 return MOCKITO_CORE.mock(classToMock, mockSettings); in mock()
|