This content has been marked as final.
Show 1 reply
-
1. Re: Injecting spring mocks into seam beans during integration tests
westdwestd.david.west.cusppoint.com Jul 4, 2008 2:33 PM (in response to westdwestd.david.west.cusppoint.com)Sorry my last post is garbled, trying again here
Is it possible to inject a spring bean mock into my Seam beans under test during seam integration tests?
My seam bean under test has the following dependency:
@In("#{userService}")
UserService userService;
I've tried mocking out the UserService as follows
@Name("userService")
@Install(precedence=Install.MOCK)
public class UserServiceMock implements UserService..
I've also tried
@Name("#{userService}")
@Install(precedence=Install.MOCK)
public class UserServiceMock implements UserService
In both cases I get: Caused by: javax.el.ELException: org.jboss.seam.RequiredException: @In attribute requires non-null value: mySeamBean.HASH{userService}
Any guidance would be greatly appreciated