Searched refs:spiedInstance (Results 1 – 13 of 13) sorted by relevance
40 public void validateMockedType(Class<?> classToMock, Object spiedInstance) { in validateMockedType() argument41 if (classToMock == null || spiedInstance == null) { in validateMockedType()44 if (!classToMock.equals(spiedInstance.getClass())) { in validateMockedType()45 throw mockedTypeIsInconsistentWithSpiedInstanceType(classToMock, spiedInstance); in validateMockedType()
37 Object spiedInstance = settings.getSpiedInstance(); in createMock() local38 if (spiedInstance != null) { in createMock()39 new LenientCopyTool().copyToMock(spiedInstance, mock); in createMock()
28 protected Object spiedInstance; field in CreationSettings49 this.spiedInstance = copy.spiedInstance; in CreationSettings()88 return spiedInstance; in getSpiedInstance()
83 return spiedInstance; in getSpiedInstance()93 public MockSettings spiedInstance(Object spiedInstance) { in spiedInstance() method in MockSettingsImpl94 this.spiedInstance = spiedInstance; in spiedInstance()
87 mock(List.class, withSettings().spiedInstance(list)); in shouldScreamWhenSpyCreatedWithWrongType()97 mock(LinkedList.class, withSettings().spiedInstance(list)); in shouldAllowCreatingSpiesWithCorrectType()
258 .spiedInstance(list) in should_serialize_with_real_object_spy()
280 .spiedInstance(sample) in should_serialize_with_real_object_spy()
76 withSettings().spiedInstance(instance) in spyInstance()112 return Mockito.mock(type, settings.spiedInstance(constructor.newInstance())); in spyNewInstance()
44 .spiedInstance(instance) in processInjection()
129 MockSettings spiedInstance(Object instance); in spiedInstance() method
1990 .spiedInstance(object) in spy()
127 withSettings().spiedInstance(new FooImpl()).verboseLogging()); in shouldPrintRealInvocationOnSpyToStdOut()
602 …xception mockedTypeIsInconsistentWithSpiedInstanceType(Class<?> mockedType, Object spiedInstance) { in mockedTypeIsInconsistentWithSpiedInstanceType() argument605 …"Mocked type must be: " + spiedInstance.getClass().getSimpleName() + ", but is: " + mockedType.get… in mockedTypeIsInconsistentWithSpiedInstanceType()