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 * Tests for DISPL-26 - More params for paging.banner.*_items_found. 12 * @author Fabrizio Giustina 13 * @version $Revision: 876 $ ($Author: fgiust $) 14 */ 15 public class Displ026Test extends DisplaytagCase 16 { 17 18 /** 19 * @see org.displaytag.test.DisplaytagCase#getJspName() 20 */ 21 public String getJspName() 22 { 23 return "DISPL-026.jsp"; 24 } 25 26 /** 27 * Check addictional parameters in paging.banner.*. 28 * @param jspName jsp name, with full path 29 * @throws Exception any axception thrown during test. 30 */ 31 public void doTest(String jspName) throws Exception 32 { 33 WebRequest request = new GetMethodWebRequest(jspName); 34 WebResponse response; 35 36 response = runner.getResponse(request); 37 assertEquals("Parameters {5} and {6} are not correctly evaluated in paging.banner.first.", "1|3", response 38 .getElementWithID("numbers") 39 .getText()); 40 assertEquals( 41 "Parameters {4} and {5} are not correctly evaluated in paging.banner.some_items_found.", 42 "1|3", 43 response.getElementWithID("label").getText()); 44 } 45 46 }