net.sourceforge.jwebunit.html
Class Table

java.lang.Object
  extended by net.sourceforge.jwebunit.html.Table

public class Table
extends java.lang.Object

Represents an expected table for comparison with an actual html table.

Author:
Jim Weaver, Julien Henry

Constructor Summary
Table()
          Construct a table without providing any contents; they can be appended subsequently.
Table(java.lang.Object[][] values)
          Construct a table from a two dimensional array of objects.
 
Method Summary
 void appendRow(Row row)
          Append a single expected row.
 void appendRows(java.lang.Object[][] newExpectedValues)
          Append any number of rows, represented by a two dimensional array of objects.
 void appendRows(Table table)
          Append another table's rows.
 void assertEquals(Table t)
           
 void assertMatch(Table t)
           
 void assertSubTableEquals(int startRow, Table t)
           
 void assertSubTableMatch(int startRow, Table t)
           
 int getRowCount()
           
 java.util.ArrayList getRows()
           
 boolean hasMatch(java.lang.String regexp)
           
 boolean hasText(java.lang.String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Table

public Table()
Construct a table without providing any contents; they can be appended subsequently.


Table

public Table(java.lang.Object[][] values)
Construct a table from a two dimensional array of objects. Each object's string value will be used with a colspan of 1, unless an object is an Cell, in which case its defined value and colspan are used.

Parameters:
values - two-dimensional array representing table cells.
Method Detail

appendRows

public void appendRows(java.lang.Object[][] newExpectedValues)
Append any number of rows, represented by a two dimensional array of objects. Each object's string value will be used with a colspan of 1, unless an object is an Cell, in which case its defined value and colspan are used.

Parameters:
newExpectedValues - two-dimensional array representing expected table cells.

appendRows

public void appendRows(Table table)
Append another table's rows.

Parameters:
table - table whose rows are to be appended.

appendRow

public void appendRow(Row row)
Append a single expected row.

Parameters:
row - row to be appended.

getRowCount

public int getRowCount()

getRows

public java.util.ArrayList getRows()

hasText

public boolean hasText(java.lang.String text)

hasMatch

public boolean hasMatch(java.lang.String regexp)

assertEquals

public void assertEquals(Table t)

assertSubTableEquals

public void assertSubTableEquals(int startRow,
                                 Table t)

assertMatch

public void assertMatch(Table t)

assertSubTableMatch

public void assertSubTableMatch(int startRow,
                                Table t)


Copyright © 2002-2011 SourceForge. All Rights Reserved.