[jboss-user] [JBoss Seam] - Re: Problem injecting (@In) entityManger in TestNG unit test

christian.bauer@jboss.com do-not-reply at jboss.com
Mon Jun 11 04:25:13 EDT 2007


You need to call it in a JSF phase:


  |     @Test
  |     public void myTest throws Exception {
  | 
  |         new FacesRequest() {
  |             protected void invokeApplication() throws Exception {
  |                 Component.getInstance("entityManager");
  |             }
  |         }.run();
  | 
  |     }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052998#4052998

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052998



More information about the jboss-user mailing list