File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Groovy and the fly likes Groovy stubs (and mocks) proxyInstance vs proxyDelegateInstance Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Other Languages » Groovy
Reply Bookmark "Groovy stubs (and mocks) proxyInstance vs proxyDelegateInstance" Watch "Groovy stubs (and mocks) proxyInstance vs proxyDelegateInstance" New topic
Author

Groovy stubs (and mocks) proxyInstance vs proxyDelegateInstance

Jeff Storey
Ranch Hand

Joined: Apr 07, 2007
Posts: 229
In the groovy StubFor and MockFor classes, can someone explain the difference between proxyInstance and proxyDelegateInstance and when to use which?

thanks,
Jeff


Jeff Storey
Software Developer
[url]http://jeffastorey.blogspot.com[/url]
Jeff Storey
Ranch Hand

Joined: Apr 07, 2007
Posts: 229
Ah, nevermind, I got it. The proxyDelegateInstance needs to be used when passing the mock to a java object.
 
 
subject: Groovy stubs (and mocks) proxyInstance vs proxyDelegateInstance
 
Threads others viewed
Java
Groovy - another OO script
What would you say about Groovy?
Gwing
Welcome Dierk Koenig
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture