wood burning stoves 2.0*
The moose likes Groovy and the fly likes Groovy stubs (and mocks) proxyInstance vs proxyDelegateInstance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Groovy
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: 230
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: 230
Ah, nevermind, I got it. The proxyDelegateInstance needs to be used when passing the mock to a java object.
 
Consider Paul's rocket mass heater.
 
subject: Groovy stubs (and mocks) proxyInstance vs proxyDelegateInstance
 
Similar Threads
Welcome Dierk Koenig
What would you say about Groovy?
Groovy - another OO script
Gwing
Java