Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

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

scott.stark@jboss.org

2007-07-23


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
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.