my dog learned polymorphism*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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.
 
jQuery in Action, 2nd edition
 
subject: Groovy stubs (and mocks) proxyInstance vs proxyDelegateInstance