On Fri, Oct 24, 2008 at 6:33 PM, Barrie Treloar <[EMAIL PROTECTED]> wrote: > On Fri, Oct 24, 2008 at 4:39 PM, Johan Haleby <[EMAIL PROTECTED]> wrote: >> You could try out PowerMock (www.powermock.org), it allows you to mock final >> classes/methods easily if you're used to EasyMock. > > Nice! > > I will write up some tests then. >
I'm finding the use of PowerMock to be not as simple as I would like. i.e I want a partial mock of NioDatagramConnector() where all I need to change is the call of AbstractPollingIoProcessor.write(T session, IoBuffer buf, int length) to throw an Exception. I can't even get a partial mock created where non of the methods are mocked. Now this isn't the powermock mailing list :) but maybe Johan has some suggestions to help me get the unit tests done.
