How does AtUnit fare with respect to unit testing using DI and guice ?. Please share your experiences.
A:
I have found it works rather well and is very simple to use. In my case though, after a while, I decided to revert back to my old pattern of rarely using DI in unit tests, unless I'm testing something functional. I found that all the extras that AtUnit was providing were simply not being used in my situation.
In the cases where I do use Guice in tests, my unit test class extends AbstractModule
and I do the Guice initialization etc manually in my @Before
method. I suppose using AtUnit here would be pretty much the same with the exception that all my manual stuff would mostly disappear.
gpampara
2010-01-19 05:28:19