On 7 Nov, 00:06, "Barrie Treloar" <
baerr...@gmail.com> wrote:
> This is probably because the class under test has not been mocked out
> properly and the actual class is trying to do stuff, like log4j.
>
> Make sure you have @PrepareForTest( { XXX })
> Where XXX is a list of classes that PowerMock needs to enhance to mock
> out the real implementations.
Having a deadline to meet I have been forced to focus on other (not
nearly so exciting) stuff than introducing Powermock in my
unittest. :-(
However, I think you are right Barrie, there are a lot of stuff in the
class beeing tested that has not been mocked out. Yet. Among those the
class that appears in the stacktrace (GFPProxy). I just didn't think
that would be a problem when all I have right now in my test concering
Powermock is the RunWith-annotation. (I had the PrepareForTest-
annotation and my testcases using Powermock removed to isolate the
problem.) But I guess I'll give it another try when I can find the
time and try make sure the class is totally mocked out. If I still run
into trouble I'll see if I can post the class I'm trying to test to
make it easier for you to help me.
Thank you for now, hope to be back soon!
/Katarina