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("Total number of pages is not displayted properly.", "[10]", pagination.getText());
request = new GetMethodWebRequest(jspName);
request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_PAGE), "10");
response = runner.getResponse(request);
if (log.isDebugEnabled())
{
log.debug(response.getText());
}
pagination = response.getElementWithID("pagination");
assertNotNull("Paging banner not found.", pagination);
assertEquals("Total number of pages is not displayted properly.", "[10]", pagination.getText());
}
Paging banner should contain [10] |