BoundFields · google/guice Wiki
Test code which uses Guice frequently follows the pattern whereby you create several fields in your test class and bind those fields to their types using a custom Module. BoundFieldModule
can help simplify this pattern by automatically binding fields annotated with @Bind
.
Binding Fields Manually
Frequently in order to test classes which are injected, you need to inject mocks or dummy values for the tested class's dependencies. In order to do this, a common pattern is the following:
Read full article from BoundFields · google/guice Wiki
No comments:
Post a Comment