views:

240

answers:

2

Hi, I'm trying to learn how to use JMock and I'm a bit confused about what you use the .proxy() method for. I know its invoked on your Mock class but I don't understand what its puprose is.

I haven't had any luck finding a good description about how it works on google.

Any help is much appreciated.

+2  A: 

Proxy is only used in jmock1 if you are learning jmock use jmock2 and follow this cheat here

http://www.jmock.org/cheat-sheet.html

If you want to read what proxying does look at the jmock1 docs here

http://www.jmock.org/jmock1-getting-started.html

Hope this helps

Paul Whelan
A: 

I strongly recommend upgrading to jMock2, we don't support jMock 1 any more

Steve Freeman