Home
last modified time | relevance | path

Searched refs:classToMock (Results 1 – 4 of 4) sorted by relevance

/external/mockito/src/main/java/org/mockito/internal/util/
DMockCreationValidator.java21 public void validateType(Class<?> classToMock) { in validateType() argument
22 TypeMockability typeMockability = MockUtil.typeMockabilityOf(classToMock); in validateType()
24 throw cannotMockClass(classToMock, typeMockability.nonMockableReason()); in validateType()
28 … public void validateExtraInterfaces(Class<?> classToMock, Collection<Class<?>> extraInterfaces) { in validateExtraInterfaces() argument
34 if (classToMock == i) { in validateExtraInterfaces()
35 throw extraInterfacesCannotContainMockedType(classToMock); in validateExtraInterfaces()
40 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()
[all …]
DMockNameImpl.java18 public MockNameImpl(String mockName, Class<?> classToMock) { in MockNameImpl() argument
20 this.mockName = toInstanceName(classToMock); in MockNameImpl()
/external/mockito/src/main/java/org/mockito/
DMockito.java1813 public static <T> T mock(Class<T> classToMock) { in mock() argument
1814 return mock(classToMock, withSettings()); in mock()
1833 public static <T> T mock(Class<T> classToMock, String name) { in mock() argument
1834 return mock(classToMock, withSettings() in mock()
1876 public static <T> T mock(Class<T> classToMock, Answer defaultAnswer) { in mock() argument
1877 return mock(classToMock, withSettings().defaultAnswer(defaultAnswer)); in mock()
1904 public static <T> T mock(Class<T> classToMock, MockSettings mockSettings) { in mock() argument
1905 return MOCKITO_CORE.mock(classToMock, mockSettings); in mock()
/external/mockito/src/main/java/org/mockito/internal/exceptions/
DReporter.java799 …ockitoException serializableWontWorkForObjectsThatDontImplementSerializable(Class<?> classToMock) { in serializableWontWorkForObjectsThatDontImplementSerializable() argument
801 …ettings().serializable()' however the type you are trying to mock '" + classToMock.getSimpleName()… in serializableWontWorkForObjectsThatDontImplementSerializable()