[jboss-user] [JBoss Seam] - EntityController not testable?

nhpvti do-not-reply at jboss.com
Mon Jul 23 05:37:28 EDT 2007


It seems that testing of classes derived from EntityController is impossible if a logger or faces messages are in use.

Good news: EntityController has method setEntityManager 

Bad news: similar methods for logger and faces messages are missing. 

For example calling this.addFacesMessage("some text") throws the following:

java.lang.IllegalStateException: No active conversation context
  | 	at org.jboss.seam.core.FacesMessages.instance(FacesMessages.java:417)
  | 	at org.jboss.seam.framework.Controller.getFacesMessages(Controller.java:76)
  | 	at org.jboss.seam.framework.Controller.addFacesMessage(Controller.java:98)

For example calling this.info("some text") throws the following:

java.lang.NullPointerException
  | 	at org.jboss.seam.framework.Controller.info(Controller.java:213)

Is there any solution or workaround?

I'm using Seam 1.2.1 GA



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

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



More information about the jboss-user mailing list