Yes, you don't want to have dependencies on your test code.

If all you need is injection of mocks then you may want to look at jukito as it can inject mocks for any dependency for which you havn't bound an implementation.

Am 29.10.2014 02:52 schrieb Sam Berlin <sber...@gmail.com>:
@ImplementedBy is generally a bad idea because it forces your API to have a dependency on your implementation.  @MockedBy would be even worse, because it would force your API to have a dependency on your tests.

If you're looking to make testing mocked bindings easier, see https://github.com/google/guice/wiki/BoundFields, new in Guice 4.0.

sam

On Tue Oct 28 2014 at 7:01:31 PM Kevin Burton <burtona...@gmail.com> wrote:
@ImplementedBy is handy because I can have the reference implementation defined in the interface.

But for tests, I have to manually create bindings.  

I wonder if something similar is needed for mocks.  Maybe a @MockedBy  ?

Or maybe it's a bad idea :-P

--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice+unsubscr...@googlegroups.com.
To post to this group, send email to google-guice@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/cb2a65d0-24cb-4c7f-93ea-3655d5dafdc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice+unsubscr...@googlegroups.com.
To post to this group, send email to google-guice@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/CAJEBNUc88JxpeTyoj64NcK2JBhn%3DqwHdoSk8LtFfXTuV1k3R2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice+unsubscr...@googlegroups.com.
To post to this group, send email to google-guice@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/0M92ZJ-1XvmBD1glh-00CPHp%40mail.gmx.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to