Interface AssertOnNumberOfColumns<T extends AssertOnNumberOfColumns<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:
AbstractDbAssert
,AbstractRowAssert
,ChangeAssert
,ChangeRowAssert
,RequestAssert
,RequestRowAssert
,TableAssert
,TableRowAssert
- Author:
- Régis Pouiller
-
Method Summary
Modifier and TypeMethodDescriptionhasNumberOfColumns
(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.
-
Method Details
-
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);
- Parameters:
expected
- The number to compare to the number of columns.- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of columns is different to the number in parameter.- 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);
- Parameters:
expected
- The number to compare to the number of columns.- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of columns is less than or equal to the number in parameter.- Since:
- 1.1.0
- 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);
- Parameters:
expected
- The number to compare to the number of columns.- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of columns is greater than or equal to the number in parameter.- Since:
- 1.1.0
- 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);
- Parameters:
expected
- The number to compare to the number of columns.- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of columns is less than the number in parameter.- Since:
- 1.1.0
- 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);
- Parameters:
expected
- The number to compare to the number of columns.- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of columns is greater than the number in parameter.- Since:
- 1.1.0
- See Also:
-