Home
last modified time | relevance | path

Searched refs:MockUtil (Results 1 – 25 of 27) sorted by relevance

12

/external/mockito/src/test/java/org/mockito/internal/util/
DMockUtilTest.java28 assertNotNull(MockUtil.getMockHandler(mock)); in should_get_handler()
33 MockUtil.getMockHandler(""); in should_scream_when_not_a_mock_passed()
38 MockUtil.getMockHandler(null); in should_scream_when_null_passed()
44 assertNotNull(MockUtil.getMockSettings(mock)); in should_get_mock_settings()
49 assertFalse(MockUtil.isMock("i mock a mock")); in should_validate_mock()
50 assertTrue(MockUtil.isMock(Mockito.mock(List.class))); in should_validate_mock()
55 assertFalse(MockUtil.isSpy("i mock a mock")); in should_validate_spy()
56 assertFalse(MockUtil.isSpy(Mockito.mock(List.class))); in should_validate_spy()
57 assertFalse(MockUtil.isSpy(null)); in should_validate_spy()
59 assertTrue(MockUtil.isSpy(Mockito.spy(new ArrayList()))); in should_validate_spy()
[all …]
/external/mockito/src/main/java/org/mockito/internal/util/
DDefaultMockingDetails.java32 return MockUtil.isMock(toInspect); in isMock()
37 return MockUtil.isSpy(toInspect); in isSpy()
47 return MockUtil.getInvocationContainer(toInspect); in getInvocationContainer()
78 return MockUtil.getMockHandler(toInspect); in mockHandler()
DMockUtil.java22 public class MockUtil { class
26 private MockUtil() {} in MockUtil() method in MockUtil
DMockCreationValidator.java22 TypeMockability typeMockability = MockUtil.typeMockabilityOf(classToMock); in validateType()
/external/mockito/src/main/java/org/mockito/internal/configuration/injection/scanner/
DMockScanner.java9 import org.mockito.internal.util.MockUtil;
72 MockUtil.maybeRedefineMockName(instance, field.getName()); in preparedMock()
83 return MockUtil.isMock(instance) in isMockOrSpy()
84 || MockUtil.isSpy(instance); in isMockOrSpy()
/external/mockito/src/main/java/org/mockito/internal/util/collections/
DHashCodeAndEqualsMockWrapper.java7 import org.mockito.internal.util.MockUtil;
60 …"mockInstance=" + (MockUtil.isMock(mockInstance) ? MockUtil.getMockName(mockInstance) : typeInstan… in toString()
/external/mockito/src/test/java/org/mockitousage/annotation/
DSpyAnnotationInitializedInBaseClassTest.java11 import org.mockito.internal.util.MockUtil;
18 import static org.mockito.internal.util.MockUtil.isMock;
40 assertTrue(MockUtil.isMock(subClass.list)); in shouldInitSpiesInBaseClass()
DSpyInjectionTest.java10 import org.mockito.internal.util.MockUtil;
30 MockUtil.isMock(hasSpy.spy); in shouldDoStuff()
DMockInjectionUsingConstructorIssue421Test.java12 import org.mockito.internal.util.MockUtil;
42 assertThat(MockUtil.isMock(calculator)).isTrue(); in checkIfMockIsInjected()
DMockInjectionUsingSetterOrPropertyTest.java15 import org.mockito.internal.util.MockUtil;
70 assertTrue(MockUtil.isMock(initializedSpy)); in should_inject_mocks_in_spy()
77 assertTrue(MockUtil.isMock(notInitializedSpy)); in should_initialize_spy_if_null_and_inject_mocks()
DMockInjectionUsingConstructorTest.java21 import org.mockito.internal.util.MockUtil;
86 assertFalse(MockUtil.isMock(articleManager)); in objects_created_with_constructor_initialization_can_be_spied()
87 assertTrue(MockUtil.isMock(spiedArticleManager)); in objects_created_with_constructor_initialization_can_be_spied()
/external/mockito/src/main/java/org/mockito/internal/stubbing/defaultanswers/
DReturnsDeepStubs.java13 import org.mockito.internal.util.MockUtil;
60 InvocationContainerImpl container = MockUtil.getInvocationContainer(invocation.getMock()); in deepStub()
95 MockCreationSettings parentMockSettings = MockUtil.getMockSettings(parentMock); in newDeepStubMock()
125 …CreationSettings mockSettings = (CreationSettings) MockUtil.getMockHandler(mock).getMockSettings(); in actualParameterizedType()
DTriesToReturnSelf.java7 import org.mockito.internal.util.MockUtil;
20 Class<?> mockType = MockUtil.getMockHandler(mock).getMockSettings().getTypeToMock(); in answer()
DReturnsEmptyValues.java8 import org.mockito.internal.util.MockUtil;
60 MockName name = MockUtil.getMockName(mock); in answer()
62 …return "Mock for " + MockUtil.getMockSettings(mock).getTypeToMock().getSimpleName() + ", hashCode:… in answer()
/external/mockito/src/test/java/org/mockito/internal/stubbing/defaultanswers/
DReturnsMocksTest.java9 import org.mockito.internal.util.MockUtil;
30 assertTrue(MockUtil.isMock(interfaceMock)); in should_return_mock_value_for_interface()
36 assertTrue(MockUtil.isMock(classMock)); in should_return_mock_value_for_class()
/external/mockito/src/main/java/org/mockito/internal/creation/bytebuddy/
DByteBuddyCrossClassLoaderSerializationSupport.java12 import org.mockito.internal.util.MockUtil;
117 MockName mockName = MockUtil.getMockName(mockitoMock); in writeReplace()
118 … String mockedType = MockUtil.getMockSettings(mockitoMock).getTypeToMock().getCanonicalName(); in writeReplace()
182 MockCreationSettings<?> mockSettings = MockUtil.getMockSettings(mockitoMock); in CrossClassLoaderSerializationProxy()
/external/mockito/src/main/java/org/mockito/internal/invocation/
DUnusedStubsFinder.java8 import org.mockito.internal.util.MockUtil;
26 … List<Stubbing> fromSingleMock = MockUtil.getInvocationContainer(mock).getStubbingsDescending(); in find()
/external/mockito/src/main/java/org/mockito/internal/
DMockitoCore.java49 import static org.mockito.internal.util.MockUtil.createMock;
50 import static org.mockito.internal.util.MockUtil.getInvocationContainer;
51 import static org.mockito.internal.util.MockUtil.isMock;
52 import static org.mockito.internal.util.MockUtil.resetMock;
53 import static org.mockito.internal.util.MockUtil.typeMockabilityOf;
/external/mockito/src/main/java/org/mockito/internal/stubbing/
DStubberImpl.java10 import org.mockito.internal.util.MockUtil;
23 import static org.mockito.internal.util.MockUtil.isMock;
46 MockUtil.getInvocationContainer(mock).setAnswersForStubbing(answers, strictness); in when()
/external/mockito/src/main/java/org/mockito/internal/stubbing/answers/
DThrowsException.java9 import org.mockito.internal.util.MockUtil;
40 if (MockUtil.isMock(throwable)) { in answer()
/external/mockito/src/main/java/org/mockito/internal/configuration/injection/
DSpyOnInjectedFieldsHandler.java11 import org.mockito.internal.util.MockUtil;
38 if (MockUtil.isMock(instance)) { in processInjection()
/external/mockito/src/main/java/org/mockito/internal/reporting/
DPrintSettings.java10 import org.mockito.internal.util.MockUtil;
48 …String qualifiedName = MockUtil.getMockName(invocation.getMock()) + "." + invocation.getMethod().g… in print()
/external/mockito/src/test/java/org/mockitousage/debugging/
DVerboseLoggingOfInvocationsOnMockTest.java13 import org.mockito.internal.util.MockUtil;
159 return MockUtil.getMockName(mock).toString(); in mockName()
/external/mockito/src/main/java/org/mockito/internal/configuration/
DSpyAnnotationEngine.java19 import org.mockito.internal.util.MockUtil;
58 if (MockUtil.isMock(instance)) { in process()
/external/mockito/src/main/java/org/mockito/internal/util/reflection/
DFieldInitializer.java8 import org.mockito.internal.util.MockUtil;
243 if(MockUtil.typeMockabilityOf(aClass).mockable()){

12