Author Login
Post Reply
Nat Pryce <nat.pryce@(protected):
>
> You're on the right track.
>
> But... how does the ServiceClass object get a reference to the DAO it
> uses? In your test you need to give it a mock instance, not a real
> one.
>
> --Nat
Thanks for your reply Nat. The ServiceClass has a setter method for the DAO so
that the test class can inject the mock DAO into the ServiceClass and I am sure
the setter is called before the method to test is called.
Anymore hints?
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email