public void doTest(String jspName) throws Exception {
WebRequest request = new GetMethodWebRequest(jspName);
WebResponse response = runner.getResponse(request);
if (log.isDebugEnabled())
{
log.debug("RESPONSE: " + response.getText());
}
WebTable[] tables = response.getTables();
assertEquals("Wrong number of tables.", 1, tables.length);
assertEquals("Bad number of generated columns.", 2, tables[0].getColumnCount());
assertEquals("Bad number of generated rows.", 2, tables[0].getRowCount());
assertEquals("Bad content in column 1.", "ant", tables[0].getCellAsText(1, 0));
assertEquals("Bad content in column 2.", "bee", tables[0].getCellAsText(1, 1));
}
Checks for the expected values in columns. |