public void doTest(String jspName) throws Exception {
WebRequest request = new GetMethodWebRequest(jspName);
ParamEncoder encoder = new ParamEncoder("table");
request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_PAGE), "9");
WebResponse response = runner.getResponse(request);
if (log.isDebugEnabled())
{
log.debug(response.getText());
}
HTMLElement pagination = response.getElementWithID("pagination");
assertNotNull("Paging banner not found.", pagination);
assertEquals("Pagination links are not as expected.", "6, 7, 8, [9], 10", pagination.getText());
}
The last page should show up in the list. |