3 Replies Latest reply on Aug 17, 2007 10:38 AM by Lars Huber

    EntityController not testable?

    Valerij Timofeev Newbie

      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:

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

      Is there any solution or workaround?

      I'm using Seam 1.2.1 GA