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.
| Online: | 31 Members of 4509 |
| Forum: Seam Users |
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
View is not tested.
Seems like a great enhancement request to make testing easier without any more coding on the unit test developer's part.
You might be interested in following the progress of: http://www.jboss.org/jsfunit/