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>>
- Type Parameters:
D
- The class of the actual value (an sub-class ofAbstractDbData
).A
- The class of the original assert (an sub-class ofAbstractDbAssert
).C
- The class of this assert (an sub-class ofAbstractColumnAssert
).CV
- The class of this assertion on the value (an sub-class ofAbstractColumnValueAssert
).R
- The class of the equivalent row assert (an sub-class ofAbstractRowAssert
).RV
- The class of the equivalent row assertion on the value (an sub-class ofAbstractRowValueAssert
).
- All Implemented Interfaces:
org.assertj.core.api.Descriptable<A>
,AssertOnNumberOfColumns<A>
,AssertOnNumberOfRows<A>
,Navigation
,Origin
,OriginWithColumnsAndRows<C,
,R> ToColumn<C>
,ToRow<R>
- Direct Known Subclasses:
RequestAssert
,TableAssert
Table
or Request
) assertions.- Author:
- Régis Pouiller
-
Field Summary
FieldsFields inherited from class org.assertj.db.global.AbstractElement
info, myself
-
Method Summary
Modifier and TypeMethodDescriptioncolumn()
column
(int index) Returns assertion methods on theColumn
at theindex
in parameter.Returns assertion methods on theColumn
corresponding to the column name in parameter.hasNumberOfColumns
(int expected) Verifies that the number of columns is equal to the number in parameter.hasNumberOfColumnsGreaterThan
(int expected) Verifies that the number of columns is greater than the number in parameter.hasNumberOfColumnsGreaterThanOrEqualTo
(int expected) Verifies that the number of columns is greater than or equal to the number in parameter.hasNumberOfColumnsLessThan
(int expected) Verifies that the number of columns is less than the number in parameter.hasNumberOfColumnsLessThanOrEqualTo
(int expected) Verifies that the number of columns is less than or equal to the number in parameter.hasNumberOfRows
(int expected) Verifies that the number of rows is equal to the number in parameter.hasNumberOfRowsGreaterThan
(int expected) Verifies that the number of rows is greater than the number in parameter.hasNumberOfRowsGreaterThanOrEqualTo
(int expected) Verifies that the number of rows is greater than or equal to the number in parameter.hasNumberOfRowsLessThan
(int expected) Verifies that the number of rows is less than the number in parameter.hasNumberOfRowsLessThanOrEqualTo
(int expected) Verifies that the number of rows is less than or equal to the number in parameter.isEmpty()
Verifies that the number of rows is zero.row()
row
(int index) Returns assertion methods on theRow
at theindex
in parameter.Methods inherited from class org.assertj.db.global.AbstractElement
as, as, describedAs, describedAs, getInfo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.assertj.core.api.Descriptable
as
-
Field Details
-
actual
The actual value on which the assertion is.
-
-
Method Details
-
row
-
row
Returns assertion methods on theRow
at theindex
in parameter. -
column
-
column
Returns assertion methods on theColumn
at theindex
in parameter. -
column
Returns assertion methods on theColumn
corresponding to the column name in parameter. -
isEmpty
Verifies that the number of rows is zero.Example where the assertion verifies that the table is empty :
assertThat(table).isEmpty();
- Specified by:
isEmpty
in interfaceAssertOnNumberOfRows<D extends AbstractDbData<D>>
- Returns:
this
assertion object.- See Also:
-
hasNumberOfRows
Verifies that the number of rows is equal to the number in parameter.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);
- Specified by:
hasNumberOfRows
in interfaceAssertOnNumberOfRows<D extends AbstractDbData<D>>
- Parameters:
expected
- The number to compare to the number of rows.- Returns:
this
assertion object.- See Also:
-
hasNumberOfRowsGreaterThan
Verifies that the number of rows is greater than the number in parameter.Example where the assertion verifies that the table has more than 8 rows :
assertThat(table).hasNumberOfRowsGreaterThan(8);
Example where the assertion verifies that the first row of the table has more than 8 rows :
assertThat(table).row().hasNumberOfRowsGreaterThan(8);
Example where the assertion verifies that the row at end point of the first change has more than 8 rows :
assertThat(changes).change().rowAtEndPoint().hasNumberOfRowsGreaterThan(8);
- Specified by:
hasNumberOfRowsGreaterThan
in interfaceAssertOnNumberOfRows<D extends AbstractDbData<D>>
- Parameters:
expected
- The number to compare to the number of rows.- Returns:
this
assertion object.- See Also:
-
hasNumberOfRowsLessThan
Verifies that the number of rows is less than the number in parameter.Example where the assertion verifies that the table has less than 8 rows :
assertThat(table).hasNumberOfRowsLessThan(8);
Example where the assertion verifies that the first row of the table has less than 8 rows :
assertThat(table).row().hasNumberOfRowsLessThan(8);
Example where the assertion verifies that the row at end point of the first change has less than 8 rows :
assertThat(changes).change().rowAtEndPoint().hasNumberOfRowsLessThan(8);
- Specified by:
hasNumberOfRowsLessThan
in interfaceAssertOnNumberOfRows<D extends AbstractDbData<D>>
- Parameters:
expected
- The number to compare to the number of rows.- Returns:
this
assertion object.- See Also:
-
hasNumberOfRowsGreaterThanOrEqualTo
Verifies that the number of rows is greater than or equal to the number in parameter.Example where the assertion verifies that the table has at least 8 rows :
assertThat(table).hasNumberOfRowsGreaterThanOrEqualTo(8);
Example where the assertion verifies that the first row of the table has at least 8 rows :
assertThat(table).row().hasNumberOfRowsGreaterThanOrEqualTo(8);
Example where the assertion verifies that the row at end point of the first change has at least 8 rows :
assertThat(changes).change().rowAtEndPoint().hasNumberOfRowsGreaterThanOrEqualTo(8);
- Specified by:
hasNumberOfRowsGreaterThanOrEqualTo
in interfaceAssertOnNumberOfRows<D extends AbstractDbData<D>>
- Parameters:
expected
- The number to compare to the number of rows.- Returns:
this
assertion object.- See Also:
-
hasNumberOfRowsLessThanOrEqualTo
Verifies that the number of rows is less than or equal to the number in parameter.Example where the assertion verifies that the table has at most 8 rows :
assertThat(table).hasNumberOfRowsLessThanOrEqualTo(8);
Example where the assertion verifies that the first row of the table has at most 8 rows :
assertThat(table).row().hasNumberOfRowsLessThanOrEqualTo(8);
Example where the assertion verifies that the row at end point of the first change has at most 8 rows :
assertThat(changes).change().rowAtEndPoint().hasNumberOfRowsLessThanOrEqualTo(8);
- Specified by:
hasNumberOfRowsLessThanOrEqualTo
in interfaceAssertOnNumberOfRows<D extends AbstractDbData<D>>
- Parameters:
expected
- The number to compare to the number of rows.- Returns:
this
assertion object.- See Also:
-
hasNumberOfColumns
Verifies that the number of columns is equal to the number in parameter.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);
- Specified by:
hasNumberOfColumns
in interfaceAssertOnNumberOfColumns<D extends AbstractDbData<D>>
- Parameters:
expected
- The number to compare to the number of columns.- Returns:
this
assertion object.- See Also:
-
hasNumberOfColumnsGreaterThan
Verifies that the number of columns is greater than the number in parameter.Example where the assertion verifies that the table has more than 8 columns :
assertThat(table).hasNumberOfColumnsGreaterThan(8);
Example where the assertion verifies that the first row of the table has more than 8 columns :
assertThat(table).row().hasNumberOfColumnsGreaterThan(8);
Example where the assertion verifies that the row at end point of the first change has more than 8 columns :
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsGreaterThan(8);
- Specified by:
hasNumberOfColumnsGreaterThan
in interfaceAssertOnNumberOfColumns<D extends AbstractDbData<D>>
- Parameters:
expected
- The number to compare to the number of columns.- Returns:
this
assertion object.- See Also:
-
hasNumberOfColumnsLessThan
Verifies that the number of columns is less than the number in parameter.Example where the assertion verifies that the table has less than 8 columns :
assertThat(table).hasNumberOfColumnsLessThan(8);
Example where the assertion verifies that the first row of the table has less than 8 columns :
assertThat(table).row().hasNumberOfColumnsLessThan(8);
Example where the assertion verifies that the row at end point of the first change has less than 8 columns :
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsLessThan(8);
- Specified by:
hasNumberOfColumnsLessThan
in interfaceAssertOnNumberOfColumns<D extends AbstractDbData<D>>
- Parameters:
expected
- The number to compare to the number of columns.- Returns:
this
assertion object.- See Also:
-
hasNumberOfColumnsGreaterThanOrEqualTo
Verifies that the number of columns is greater than or equal to the number in parameter.Example where the assertion verifies that the table has at least 8 columns :
assertThat(table).hasNumberOfColumnsGreaterThanOrEqualTo(8);
Example where the assertion verifies that the first row of the table has at least 8 columns :
assertThat(table).row().hasNumberOfColumnsGreaterThanOrEqualTo(8);
Example where the assertion verifies that the row at end point of the first change has at least 8 columns :
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsGreaterThanOrEqualTo(8);
- Specified by:
hasNumberOfColumnsGreaterThanOrEqualTo
in interfaceAssertOnNumberOfColumns<D extends AbstractDbData<D>>
- Parameters:
expected
- The number to compare to the number of columns.- Returns:
this
assertion object.- See Also:
-
hasNumberOfColumnsLessThanOrEqualTo
Verifies that the number of columns is less than or equal to the number in parameter.Example where the assertion verifies that the table has at most 8 columns :
assertThat(table).hasNumberOfColumnsLessThanOrEqualTo(8);
Example where the assertion verifies that the first row of the table has at most 8 columns :
assertThat(table).row().hasNumberOfColumnsLessThanOrEqualTo(8);
Example where the assertion verifies that the row at end point of the first change has at most 8 columns :
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsLessThanOrEqualTo(8);
- Specified by:
hasNumberOfColumnsLessThanOrEqualTo
in interfaceAssertOnNumberOfColumns<D extends AbstractDbData<D>>
- Parameters:
expected
- The number to compare to the number of columns.- Returns:
this
assertion object.- See Also:
-