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.", 1, tables[0].getColumnCount());
assertEquals("Bad number of generated rows.", 4, tables[0].getRowCount());
assertEquals("string1", tables[0].getCellAsText(1, 0));
assertEquals("string2", tables[0].getCellAsText(2, 0));
assertEquals("string3", tables[0].getCellAsText(3, 0));
}
Verifies that the generated page contains a table with the expected number of columns. |