Home » displaytag-1.1.1-src » org » displaytag » jsptests » [javadoc | source]

    1   package org.displaytag.jsptests;
    2   
    3   import org.displaytag.test.DisplaytagCase;
    4   
    5   import com.meterware.httpunit.GetMethodWebRequest;
    6   import com.meterware.httpunit.WebRequest;
    7   import com.meterware.httpunit.WebResponse;
    8   
    9   
   10   /**
   11    * Basic tests for pagination.
   12    * @author Fabrizio Giustina
   13    * @version $Revision: 907 $ ($Author: fgiust $)
   14    */
   15   public class PartialListSortFullTest extends DisplaytagCase
   16   {
   17   
   18       /**
   19        * @see org.displaytag.test.DisplaytagCase#getJspName()
   20        */
   21       public String getJspName()
   22       {
   23           return "partialListSortFull.jsp";
   24       }
   25   
   26       /**
   27        * Verifies that the generated page contains the pagination links with the inupt parameter. Tests #917200 ("{}" in
   28        * parameters).
   29        * @param jspName jsp name, with full path
   30        * @throws Exception any axception thrown during test.
   31        */
   32       public void doTest(String jspName) throws Exception
   33       {
   34   
   35           WebRequest request = new GetMethodWebRequest(jspName);
   36   
   37           WebResponse response = null;
   38   
   39           try
   40           {
   41               response = runner.getResponse(request);
   42               fail("Should have thrown an exception, its invalid to have sort=full when partialList=true");
   43           }
   44           catch (Throwable t)
   45           {
   46           }
   47   
   48           if (log.isDebugEnabled() && response != null)
   49           {
   50               log.debug("RESPONSE: " + response.getText());
   51           }
   52       }
   53   }

Home » displaytag-1.1.1-src » org » displaytag » jsptests » [javadoc | source]