2 Replies Latest reply on Mar 31, 2009 9:08 AM by gerry365

    SeamTest-TestNG - an example of applyRequestValues() usage

      Has any forum member actually used applyRequestValues() method because I have yet to see an example of its use in the various Seam References or online?


      The interaction I wish to test is fairly basic:



      <html>
       <head>
        <title>User Login</title>
       </head>
       <body>
        <f:view>
         <h:form>
           <table>
             <tr>
               <td>Username</td>
               <td><h:inputText value="#{user.username}"/></td>
             </tr>
             <tr>
               <td>Password</td>
               <td><h:inputSecret value="#{user.password}"/></td>
             </tr>
           </table>
           <h:messages/>
           <h:commandButton type="submit" value="Login" action="#{Login.login}"/>
         </h:form>
        </f:view>
       </body>
      </html>




      I would like to see an example of how the JSF Apply Request Values phase is handled in a test case.


      new FacesRequest() {
          /
          
      Override to implement the interactions between the JSF page and your
           components that occurs during the apply request values phase.
          
      /
          @Override
          protected void applyRequestValues() {
              ???????                
          }