D - The class of the actual value (an sub-class of AbstractDbData).A - The class of the original assert (an sub-class of AbstractDbAssert).C - The class of this assert (an sub-class of AbstractColumnAssert).CV - The class of this assertion on the value (an sub-class of AbstractColumnValueAssert).R - The class of the equivalent row assert (an sub-class of AbstractRowAssert).RV - The class of the equivalent row assertion on the value (an sub-class of AbstractRowValueAssert).public abstract class AbstractDbAssert<D extends AbstractDbData<D>,A extends AbstractDbAssert<D,A,C,CV,R,RV>,C extends AbstractColumnAssert<D,A,C,CV,R,RV>,CV extends AbstractColumnValueAssert<D,A,C,CV,R,RV>,R extends AbstractRowAssert<D,A,C,CV,R,RV>,RV extends AbstractRowValueAssert<D,A,C,CV,R,RV>> extends AbstractAssert<A> implements OriginWithColumnsAndRows<C,R>, AssertOnNumberOfColumns<A>, AssertOnNumberOfRows<A>
Table or Request) assertions.info, myself| Modifier and Type | Method and Description |
|---|---|
C |
column()
|
C |
column(int index)
Returns assertion methods on the
Column at the index in parameter. |
C |
column(String columnName)
Returns assertion methods on the
Column corresponding to the column name in parameter. |
protected Column |
getColumn(int index)
Returns the
Column at the index in parameter. |
protected Row |
getRow(int index)
Returns the
Row at the index in parameter. |
A |
hasNumberOfColumns(int expected)
Verifies that the number of columns is equal to the number in parameter.
|
A |
hasNumberOfRows(int expected)
Verifies that the number of rows is equal to the number in parameter.
|
R |
row()
|
R |
row(int index)
Returns assertion methods on the
Row at the index in parameter. |
as, as, describedAs, describedAsprotected Row getRow(int index)
Row at the index in parameter.index - The index corresponding to the Row.Row.AssertJDBException - If the index is out of the bounds.public R row()
row in interface ToRow<R extends AbstractRowAssert<D,A,C,CV,R,RV>>Row.row(),
row(),
AbstractAssertWithOriginWithColumnsAndRows.row(),
AbstractAssertWithOriginWithColumnsAndRows.row(),
AbstractAssertWithOriginWithColumnsAndRows.row(),
AbstractAssertWithOriginWithColumnsAndRows.row()public R row(int index)
Row at the index in parameter.row in interface ToRow<R extends AbstractRowAssert<D,A,C,CV,R,RV>>index - The index corresponding to the Row.Row.row(int),
row(int),
AbstractAssertWithOriginWithColumnsAndRows.row(int),
AbstractAssertWithOriginWithColumnsAndRows.row(int),
AbstractAssertWithOriginWithColumnsAndRows.row(int),
AbstractAssertWithOriginWithColumnsAndRows.row(int)protected Column getColumn(int index)
Column at the index in parameter.index - The index corresponding to the Column.Column.AssertJDBException - If the index is out of the bounds.public C column()
column in interface ToColumn<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>Column.column(),
column(),
AbstractAssertWithOriginWithColumnsAndRows.column(),
AbstractAssertWithOriginWithColumnsAndRows.column(),
AbstractAssertWithOriginWithColumnsAndRows.column(),
AbstractAssertWithOriginWithColumnsAndRows.column(),
ChangeAssert.column(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column()public C column(int index)
Column at the index in parameter.column in interface ToColumn<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>index - The index corresponding to the Column.Column.column(int),
column(int),
AbstractAssertWithOriginWithColumnsAndRows.column(int),
AbstractAssertWithOriginWithColumnsAndRows.column(int),
AbstractAssertWithOriginWithColumnsAndRows.column(int),
AbstractAssertWithOriginWithColumnsAndRows.column(int),
ChangeAssert.column(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(int)public C column(String columnName)
Column corresponding to the column name in parameter.column in interface ToColumn<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>columnName - The column name.Column.column(String),
column(String),
AbstractAssertWithOriginWithColumnsAndRows.column(String),
AbstractAssertWithOriginWithColumnsAndRows.column(String),
AbstractAssertWithOriginWithColumnsAndRows.column(String),
AbstractAssertWithOriginWithColumnsAndRows.column(String),
ChangeAssert.column(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(String)public A hasNumberOfRows(int expected)
Example where the assertion verifies that the table has 2 rows :
assertThat(table).hasNumberOfRows(2);
Example where the assertion verifies that the column with index 1 of the table has 5 rows :
assertThat(table).column(1).hasNumberOfRows(5);
hasNumberOfRows in interface AssertOnNumberOfRows<A extends AbstractDbAssert<D,A,C,CV,R,RV>>expected - The number to compare to the number of rows.this assertion object.hasNumberOfRows(int),
AbstractColumnAssert.hasNumberOfRows(int)public A hasNumberOfColumns(int expected)
Example where the assertion verifies that the table has 8 columns :
assertThat(table).hasNumberOfColumns(8);
Example where the assertion verifies that the first row of the table has 8 columns :
assertThat(table).row().hasNumberOfColumns(8);
Example where the assertion verifies that the row at end point of the first change has 8 columns :
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumns(8);
hasNumberOfColumns in interface AssertOnNumberOfColumns<A extends AbstractDbAssert<D,A,C,CV,R,RV>>expected - The number to compare to the number of columns.this assertion object.hasNumberOfColumns(int),
AbstractRowAssert.hasNumberOfColumns(int),
ChangeRowAssert.hasNumberOfColumns(int)Copyright © 2015 AssertJ. All Rights Reserved.