Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
21. Aug 2008, 20:11 CET | Link

EL Expressions don't get evaulated during unit testing. I have a simple TestNG unit test:

new FacesRequest('/home.xhmtl'){
   protected void renderResponse() throws Exception {
      Renderer.instance().render(this.getViewId());
   }
}.run();

In home.xhtml there is an EL expression:


  <h:outputText value="#{user.foo}"/>

The actual method name changed to foobar and the unit test succeeded! Even though at runtime an exception is produced since the user object no longer has the foo method on it.

Do I have to copy all the EL from an xhtml file into the body of the renderResponse method to test it?

david

3 Replies:
21. Aug 2008, 20:18 CET | Link

View is not tested.

21. Aug 2008, 21:08 CET | Link

Seems like a great enhancement request to make testing easier without any more coding on the unit test developer's part.

21. Aug 2008, 21:45 CET | Link

You might be interested in following the progress of: http://www.jboss.org/jsfunit/