I have a test case where I need to mock a class (not under my control) and some interfaces (under my control). The interfaces under my control are declared package private.
I see that the route cause of the exception is that the enhanced class is in the wrong package 'org.jmock.codegen.com.rfxtech...' instead of 'com.rfxtech...'
I think that I tracked it to a change in CGLIBCoreMock:
Enhancer enhancer = new Enhancer(); enhancer.setClassLoader(mockedType.getClassLoader()); enhancer.setSuperclass(mockedType); enhancer.setCallback(this); >>enhancer.setNamingPolicy(NAMING_POLICY);
I have a few questions about this:
1. Why new code is necessary? 2. Can you append 'org.jmock.codegen' instead of prepending it? 3. Is there a workaround for this? 4. Does this behavior manifest itself in 2.4.0, as I am planning to switch to it eventually?
--------------------------------------------------------------------- To unsubscribe from this list, please visit: