T - The "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation"
for more details.public interface AssertOnNumberOfRows<T extends AssertOnNumberOfRows<T>>
| Modifier and Type | Method and Description |
|---|---|
T |
hasNumberOfRows(int expected)
Verifies that the number of rows is equal to the number in parameter.
|
T |
hasNumberOfRowsGreaterThan(int expected)
Verifies that the number of rows is greater than the number in parameter.
|
T |
hasNumberOfRowsGreaterThanOrEqualTo(int expected)
Verifies that the number of rows is greater than or equal to the number in parameter.
|
T |
hasNumberOfRowsLessThan(int expected)
Verifies that the number of rows is less than the number in parameter.
|
T |
hasNumberOfRowsLessThanOrEqualTo(int expected)
Verifies that the number of rows is less than or equal to the number in parameter.
|
T |
isEmpty()
Verifies that the number of rows is zero.
|
T isEmpty()
Example where the assertion verifies that the table is empty :
assertThat(table).isEmpty();
this assertion object.AssertionError - If the number of rows is different from zero.AbstractDbAssert.isEmpty(),
AbstractColumnAssert.isEmpty()T 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);
expected - The number to compare to the number of rows.this assertion object.AssertionError - If the number of rows is different to the number in parameter.AbstractDbAssert.hasNumberOfRows(int),
AbstractColumnAssert.hasNumberOfRows(int)T hasNumberOfRowsGreaterThan(int expected)
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);
expected - The number to compare to the number of rows.this assertion object.AssertionError - If the number of rows is less than or equal to the number in parameter.AbstractDbAssert.hasNumberOfRowsGreaterThan(int),
AbstractColumnAssert.hasNumberOfRowsGreaterThan(int)T hasNumberOfRowsLessThan(int expected)
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);
expected - The number to compare to the number of rows.this assertion object.AssertionError - If the number of rows is greater than or equal to the number in parameter.AbstractDbAssert.hasNumberOfRowsLessThan(int),
AbstractColumnAssert.hasNumberOfRowsLessThan(int)T hasNumberOfRowsGreaterThanOrEqualTo(int expected)
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);
expected - The number to compare to the number of rows.this assertion object.AssertionError - If the number of rows is less than the number in parameter.AbstractDbAssert.hasNumberOfRowsGreaterThanOrEqualTo(int),
AbstractColumnAssert.hasNumberOfRowsGreaterThanOrEqualTo(int)T hasNumberOfRowsLessThanOrEqualTo(int expected)
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);
expected - The number to compare to the number of rows.this assertion object.AssertionError - If the number of rows is greater than the number in parameter.AbstractDbAssert.hasNumberOfRowsLessThanOrEqualTo(int),
AbstractColumnAssert.hasNumberOfRowsLessThanOrEqualTo(int)Copyright © 2015–2017 AssertJ. All rights reserved.