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 PartialListMissingSizeTest extends DisplaytagCase 16 { 17 18 /** 19 * @see org.displaytag.test.DisplaytagCase#getJspName() 20 */ 21 public String getJspName() 22 { 23 return "partialListMissingSize.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, missing size attribute"); 43 } 44 catch (Throwable t) 45 { 46 } 47 48 if (log.isDebugEnabled() && response != null) 49 { 50 log.debug("RESPONSE: " + response.getText()); 51 } 52 } 53 }