Class 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 does
     new 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 Detail

      • ToStringGenerator

        public ToStringGenerator()