This content has been marked as final.
Show 1 reply
-
1. Re: Is testing a ManagedBean which has a @ManagedProperty possible?
aaron1 Aug 18, 2012 7:43 AM (in response to aaron1)Actually, I've managed to create a workaround.
Simply, @Inject the field you want as the ManagedProperty in the test class, and then set the ManagedProperty as that.
In the test class:
@Inject
theBeanIWantAsAManagedProperty theBean;
...
firstManagedBean.setManagedBean(theBean);
Not idea, but okay.