Comment by oreissig:
Score: Neutral
General Comment:
I love the general idea and actually have something similar for my personal
testing needs, but I always bind my fields to providers, that call that
field's getter. Therefore the field value is fetched again for each
injection.
I am doing it that way, because I have a TestRule, that performs the
following before each testcase:
MockitoAnnotations.initMocks(object);
injector.injectMembers(object);
so that I get fresh instances for each test case. The solution with @Bind
Provider<T> is not satisfactory, because of the syntactic overhead for
defining an anonymous inner class.
For more information:
https://code.google.com/p/google-guice/source/detail?r=c7ae433fc9d5bb20115d693743fd2535fd707c4f
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice-dev.
For more options, visit https://groups.google.com/d/optout.