Home
last modified time | relevance | path

Searched refs:typeToMock (Results 1 – 9 of 9) sorted by relevance

/external/mockito/src/main/java/org/mockito/internal/creation/bytebuddy/
DByteBuddyCrossClassLoaderSerializationSupport.java161 private final Class<?> typeToMock; field in ByteBuddyCrossClassLoaderSerializationSupport.CrossClassLoaderSerializationProxy
184 this.typeToMock = mockSettings.getTypeToMock(); in CrossClassLoaderSerializationProxy()
199 …tInputStream objectInputStream = new MockitoMockObjectInputStream(bis, typeToMock, extraInterfaces… in readResolve()
209 …"Mockito mock cannot be deserialized to a mock of '" + typeToMock.getCanonicalName() + "'. The err… in readResolve()
241 private final Class<?> typeToMock; field in ByteBuddyCrossClassLoaderSerializationSupport.MockitoMockObjectInputStream
244 …public MockitoMockObjectInputStream(InputStream in, Class<?> typeToMock, Set<Class<?>> extraInterf… in MockitoMockObjectInputStream() argument
246 this.typeToMock = typeToMock; in MockitoMockObjectInputStream()
274 .setTypeToMock(typeToMock) in resolveClass()
DSubclassByteBuddyMockMaker.java86 Class<T> typeToMock = settings.getTypeToMock(); in ensureMockIsAssignableToMockedType() local
87 return typeToMock.cast(mock); in ensureMockIsAssignableToMockedType()
/external/mockito/src/main/java/org/mockito/internal/creation/settings/
DCreationSettings.java25 protected Class<T> typeToMock; field in CreationSettings
45 this.typeToMock = copy.typeToMock; in CreationSettings()
62 return typeToMock; in getTypeToMock()
65 public CreationSettings<T> setTypeToMock(Class<T> typeToMock) { in setTypeToMock() argument
66 this.typeToMock = typeToMock; in setTypeToMock()
/external/mockito/src/main/java/org/mockito/internal/creation/
DMockSettingsImpl.java221 return typeToMock; in getTypeToMock()
225 public <T> MockCreationSettings<T> build(Class<T> typeToMock) { in build() argument
226 return validatedSettings(typeToMock, (CreationSettings<T>) this); in build()
229 …private static <T> CreationSettings<T> validatedSettings(Class<T> typeToMock, CreationSettings<T> … in validatedSettings() argument
232 validator.validateType(typeToMock); in validatedSettings()
233 validator.validateExtraInterfaces(typeToMock, source.getExtraInterfaces()); in validatedSettings()
234 validator.validateMockedType(typeToMock, source.getSpiedInstance()); in validatedSettings()
244 settings.setMockName(new MockNameImpl(source.getName(), typeToMock)); in validatedSettings()
245 settings.setTypeToMock(typeToMock); in validatedSettings()
/external/dexmaker/dexmaker-mockito/src/main/java/com/android/dx/mockito/
DDexmakerMockMaker.java80 Class<T> typeToMock = settings.getTypeToMock(); in createMock() local
85 if (typeToMock.isInterface()) { in createMock()
88 classesToMock[0] = typeToMock; in createMock()
92 …T mock = (T) Proxy.newProxyInstance(typeToMock.getClassLoader(), classesToMock, invocationHandler); in createMock()
98 ProxyBuilder b = ProxyBuilder.forClass(typeToMock) in createMock()
113 throw new MockitoException("Failed to mock " + typeToMock, e); in createMock()
/external/dexmaker/dexmaker-mockito-inline/src/main/java/com/android/dx/mockito/inline/
DInlineDexmakerMockMaker.java238 Class<T> typeToMock = settings.getTypeToMock(); in createMock() local
244 if (typeToMock.isInterface()) { in createMock()
247 classesToMock[0] = typeToMock; in createMock()
251 mock = (T) Proxy.newProxyInstance(typeToMock.getClassLoader(), classesToMock, in createMock()
255 || Modifier.isAbstract(typeToMock.getModifiers()); in createMock()
258 classTransformer.mockClass(MockFeatures.withMockFeatures(typeToMock, interfacesSet)); in createMock()
268 proxyClass = ProxyBuilder.forClass(typeToMock).implementing(extraInterfaces) in createMock()
274 throw new MockitoException("Failed to mock " + typeToMock, e); in createMock()
287 mock = instantiator.newInstance(typeToMock); in createMock()
290 + typeToMock.getSimpleName() + "'", e); in createMock()
/external/dexmaker/
Dbug-8108255.patch6 classesToMock[0] = typeToMock;
9 @SuppressWarnings("unchecked") // newProxyInstance returns the type of typeToMock
10 - T mock = (T) Proxy.newProxyInstance(typeToMock.getClassLoader(),
/external/mockito/src/main/java/org/mockito/internal/
DMockitoCore.java55 public boolean isTypeMockable(Class<?> typeToMock) { in isTypeMockable() argument
56 return typeMockabilityOf(typeToMock).mockable(); in isTypeMockable()
59 public <T> T mock(Class<T> typeToMock, MockSettings settings) { in mock() argument
64 MockCreationSettings<T> creationSettings = impl.build(typeToMock); in mock()
/external/mockito/src/main/java/org/mockito/
DMockSettings.java318 <T> MockCreationSettings<T> build(Class<T> typeToMock); in build() argument