|
From: Dion A. <di...@al...> - 2004-12-04 19:51:44
|
Colin and Dmitriy - I knew that a quick email to the list would have you guys giving me exactly what I wanted. What community is as good as that? Thanks for the tip! D -----Original Message----- From: Dmitriy Kopylenko [mailto:dko...@ru...] Sent: Saturday, December 04, 2004 1:34 PM To: spr...@li... Subject: Re: [Springframework-developer] Injecting Dependencies into Unit Test classes Dion, thankfully such infrastructure exists (since 1.1.1) in the "test" package which resides in spring-mock.jar Take a look: http://www.springframework.org/docs/api/org/springframework/test/package-sum mary.html Regards, Dmitriy. Dion Almaer wrote: >Hi guys - > >Rather than having FooTest.java do getBean("someBean") it would be nice >to just have setFooBean(...) on the test itself, and have the >dependencies injected. > >I am wondering if people have done this before, and if so, how they >went about it. > >Can you just create a base class which bootstraps everything and >injects the dependencies on the subclass itself? > >Cheers, > >Dion > > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide Read honest & candid >reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://productguide.itmanagersjournal.com/ >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |