Hi, How can i test a service, if it needs Spring Manager in build? How it is possible initialize spring context in setUp() ?
Thanks, thanks thanks in advance for any suggestions. PS: sorry for my terrible english. My JUnit Test: public class MyWebApiServiceTest extends TestCase { //Using Spring Bean Manager private MyWebApiService _myWEBAPIService; public MyWebApiServiceTest(String name) { super(name); } protected void setUp() throws Exception { super.setUp(); try { Registry registry = RegistryBuilder.buildAndStartupRegistry(AppModule.class, TapestryModule.class, SpringModule.class, AppModuleTest.class); _myWEBAPIService = registry.getService(MyWebApiService.class); } catch (Exception e) { e.printStackTrace(); } } public void testLogin() { //...testing... _myWEBAPIService. } } -- View this message in context: http://tapestry.1045711.n5.nabble.com/Testing-Services-with-injected-Spring-beans-tp3976774p3976774.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org