3 Replies Latest reply on Aug 21, 2008 9:45 PM by sjmenden

    Seam Mock Render Kit and testing EL Expressions

    dcooper.dcooper.net32.com

      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