public void doTest(String jspName) throws Exception {
WebRequest request = new GetMethodWebRequest(jspName);
ParamEncoder encoder = new ParamEncoder("table");
request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_PAGE), "3");
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.", "1, [2]", pagination.getText());
}
Last page should be loaded. |