Interface AssertOnNumberOfRows<T extends AssertOnNumberOfRows<T>>
- Type Parameters:
T
- The "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" for more details.
- All Known Implementing Classes:
AbstractColumnAssert
,AbstractDbAssert
,RequestAssert
,RequestColumnAssert
,TableAssert
,TableColumnAssert
- Author:
- Régis Pouiller, fiery-phoenix
-
Method Summary
Modifier and TypeMethodDescriptionhasNumberOfRows
(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.
-
Method Details
-
isEmpty
T isEmpty()Verifies that the number of rows is zero.Example where the assertion verifies that the table is empty :
assertThat(table).isEmpty();
- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of rows is different from zero.- Since:
- 1.2.0
- 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);
- Parameters:
expected
- The number to compare to the number of rows.- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of rows is different to the number in parameter.- 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);
- Parameters:
expected
- The number to compare to the number of rows.- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of rows is less than or equal to the number in parameter.- Since:
- 1.1.0
- 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);
- Parameters:
expected
- The number to compare to the number of rows.- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of rows is greater than or equal to the number in parameter.- Since:
- 1.1.0
- 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);
- Parameters:
expected
- The number to compare to the number of rows.- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of rows is less than the number in parameter.- Since:
- 1.1.0
- 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);
- Parameters:
expected
- The number to compare to the number of rows.- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of rows is greater than the number in parameter.- Since:
- 1.1.0
- See Also:
-