Home
last modified time | relevance | path

Searched refs:spiedInstance (Results 1 – 13 of 13) sorted by relevance

/external/mockito/src/main/java/org/mockito/internal/util/
DMockCreationValidator.java40 public void validateMockedType(Class<?> classToMock, Object spiedInstance) { in validateMockedType() argument
41 if (classToMock == null || spiedInstance == null) { in validateMockedType()
44 if (!classToMock.equals(spiedInstance.getClass())) { in validateMockedType()
45 throw mockedTypeIsInconsistentWithSpiedInstanceType(classToMock, spiedInstance); in validateMockedType()
DMockUtil.java37 Object spiedInstance = settings.getSpiedInstance(); in createMock() local
38 if (spiedInstance != null) { in createMock()
39 new LenientCopyTool().copyToMock(spiedInstance, mock); in createMock()
/external/mockito/src/main/java/org/mockito/internal/creation/settings/
DCreationSettings.java28 protected Object spiedInstance; field in CreationSettings
49 this.spiedInstance = copy.spiedInstance; in CreationSettings()
88 return spiedInstance; in getSpiedInstance()
/external/mockito/src/main/java/org/mockito/internal/creation/
DMockSettingsImpl.java83 return spiedInstance; in getSpiedInstance()
93 public MockSettings spiedInstance(Object spiedInstance) { in spiedInstance() method in MockSettingsImpl
94 this.spiedInstance = spiedInstance; in spiedInstance()
/external/mockito/src/test/java/org/mockitousage/basicapi/
DMocksCreationTest.java87 mock(List.class, withSettings().spiedInstance(list)); in shouldScreamWhenSpyCreatedWithWrongType()
97 mock(LinkedList.class, withSettings().spiedInstance(list)); in shouldAllowCreatingSpiesWithCorrectType()
DMocksSerializationForAnnotationTest.java258 .spiedInstance(list) in should_serialize_with_real_object_spy()
DMocksSerializationTest.java280 .spiedInstance(sample) in should_serialize_with_real_object_spy()
/external/mockito/src/main/java/org/mockito/internal/configuration/
DSpyAnnotationEngine.java76 withSettings().spiedInstance(instance) in spyInstance()
112 return Mockito.mock(type, settings.spiedInstance(constructor.newInstance())); in spyNewInstance()
/external/mockito/src/main/java/org/mockito/internal/configuration/injection/
DSpyOnInjectedFieldsHandler.java44 .spiedInstance(instance) in processInjection()
/external/mockito/src/main/java/org/mockito/
DMockSettings.java129 MockSettings spiedInstance(Object instance); in spiedInstance() method
DMockito.java1990 .spiedInstance(object) in spy()
/external/mockito/src/test/java/org/mockitousage/debugging/
DVerboseLoggingOfInvocationsOnMockTest.java127 withSettings().spiedInstance(new FooImpl()).verboseLogging()); in shouldPrintRealInvocationOnSpyToStdOut()
/external/mockito/src/main/java/org/mockito/internal/exceptions/
DReporter.java602 …xception mockedTypeIsInconsistentWithSpiedInstanceType(Class<?> mockedType, Object spiedInstance) { in mockedTypeIsInconsistentWithSpiedInstanceType() argument
605 …"Mocked type must be: " + spiedInstance.getClass().getSimpleName() + ", but is: " + mockedType.get… in mockedTypeIsInconsistentWithSpiedInstanceType()