Search   Feed   Browse   Add
Feed items 1 - 1 of 1 for July 2004

Dependency Injection for Unit Tests - July 17, 2004

Ever wanted Dependency Injection for your unit tests I got sick of doing context.getBean("thisDao") and context.getBean("thatDao") when testing my springified DAO classes. What I wanted was something like this: public class TestUserManagement extends BaseTestCase private UserDao userDao = null; public void testSomething() throws Exception userDao.createAdmin(); Note that I don't new any UserDao. I expect the DI container to instantiate it for...
http://www.jroller.com/ara_e/entry/dependency_injection_for_unit_tests
Available Archives
- January (7 items)
- February (2 items)
- March (3 items)
- April (3 items)
- May (1 item)
- July (1 item)
- December (1 item)
Sponsored Links
© 2008 FeedCapsule.com  |  Contact