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

    1   package org.displaytag.jsptests;
    2   
    3   import org.apache.commons.lang.StringUtils;
    4   import org.displaytag.test.DisplaytagCase;
    5   
    6   import com.meterware.httpunit.GetMethodWebRequest;
    7   import com.meterware.httpunit.WebRequest;
    8   import com.meterware.httpunit.WebResponse;
    9   import com.meterware.httpunit.WebTable;
   10   
   11   
   12   /**
   13    * Tests for DISPL-145: check that pooled tags are not affected by the fix.
   14    * @author Fabrizio Giustina
   15    * @version $Revision: 778 $ ($Author: fgiust $)
   16    */
   17   public class Displ145Test extends DisplaytagCase
   18   {
   19   
   20       /**
   21        * @see org.displaytag.test.DisplaytagCase#getJspName()
   22        */
   23       public String getJspName()
   24       {
   25           return "DISPL-145.jsp";
   26       }
   27   
   28       /**
   29        * 4 generated tables.
   30        * @param jspName jsp name, with full path
   31        * @throws Exception any axception thrown during test.
   32        */
   33       public void doTest(String jspName) throws Exception
   34       {
   35           String httpsUrl = StringUtils.replace(jspName, "http://", "https://");
   36           WebRequest request = new GetMethodWebRequest(httpsUrl);
   37   
   38           WebResponse response = runner.getResponse(request);
   39   
   40           WebTable[] tables = response.getTables();
   41           assertEquals("Wrong number of tables.", 6, tables.length);
   42   
   43       }
   44   
   45   }

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