Class ToStringGenerator
- java.lang.Object
-
- org.powermock.api.mockito.internal.invocation.ToStringGenerator
-
public class ToStringGenerator extends Object
We need to override the toString() in some classes because normally the toString "method" is assembled by calling the "qualifiedName" method but this is not possible in our case. The reason is that the qualifiedName method doesnew MockUtil().getMockName(mock)
which later will call the "isMockitoMock" method which will return false and an exception will be thrown. The reason why "isMockitoMock" returns false is that the mock is not created by the Mockito CGLib Enhancer in case of static methods.
-
-
Constructor Summary
Constructors Constructor Description ToStringGenerator()
-