override production Module

2 views
Skip to first unread message

deanhiller

unread,
Feb 17, 2011, 11:22:29 AM2/17/11
to atunit
I would like to use

Module functionalTestModule
= Modules.override(new ProductionModule()).with(new
TestModule());

for test cases so I can inherit all the production bindings and just
override them for tests(replacing instances with mocks). Is there a
way to do this with AtUnit. The implementing Module seems weird in
the design since I would think we would want to just inherit all
production bindings and mock the ones needed, but maybe there is a
second way of doing other than having the test implement Module.

Maybe there is a way to annotate AtUnit telling AtUnit the production
module in the test case and then having configure in the test case
that gets the TestModule overrides? is there such a way?

thanks,
Dean
Reply all
Reply to author
Forward
0 new messages