org.powermock.api.mockito.internal.verification
Class StaticMockAwareVerificationMode
java.lang.Object
org.mockito.internal.verification.MockAwareVerificationMode
org.powermock.api.mockito.internal.verification.StaticMockAwareVerificationMode
- All Implemented Interfaces:
- org.mockito.verification.VerificationMode
public class StaticMockAwareVerificationMode
- extends org.mockito.internal.verification.MockAwareVerificationMode
A custom extension of MockAwareVerificationMode
for static method
verification. The reason for this implementation is that since Mockito 1.8.4
the verification code in Mockito
MockHandler.handle(org.mockito.internal.invocation.Invocation)
has
changed and the verification mode MUST be an instance of
MockAwareVerificationMode
for the verification to work. Since
verifying static methods is a two step process in PowerMock we need to be
able to specify the class a later state then verification start. I.e. in
standard Mockito they always know the mock object when doing verify before
calling the method to verify:
verify(mock).methodToVerify();
In PowerMock we don't know the class when calling verifyStatic().
Methods inherited from class org.mockito.internal.verification.MockAwareVerificationMode |
verify |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StaticMockAwareVerificationMode
public StaticMockAwareVerificationMode(org.mockito.verification.VerificationMode mode)
setClassMock
public void setClassMock(Class<?> clsMock)
getMock
public Object getMock()
- Overrides:
getMock
in class org.mockito.internal.verification.MockAwareVerificationMode
Copyright © 2007-2011. All Rights Reserved.