Package org.assertj.db.api.assertions
Interface AssertOnModifiedColumns<T extends AssertOnModifiedColumns<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:
ChangeAssert
public interface AssertOnModifiedColumns<T extends AssertOnModifiedColumns<T>>
Defines the assertion methods on modified columns.
- Author:
- Régis Pouiller
-
Method Summary
Modifier and TypeMethodDescriptionhasModifiedColumns
(Integer... indexes) Verifies that the indexes of columns with a modification in the values between the start point and the end point is equals to the parameters.hasModifiedColumns
(String... names) Verifies that the names of columns with a modification in the values between the start point and the end point is equals to the parameters.hasNumberOfModifiedColumns
(int number) Verifies that the number of columns with a modification in the values between the start point and the end point is equals to the number in parameter.hasNumberOfModifiedColumnsGreaterThan
(int number) Verifies that the number of columns with a modification in the values between the start point and the end point is greater than the number in parameter.hasNumberOfModifiedColumnsGreaterThanOrEqualTo
(int number) Verifies that the number of columns with a modification in the values between the start point and the end point is greater than or equal to the number in parameter.hasNumberOfModifiedColumnsLessThan
(int number) Verifies that the number of columns with a modification in the values between the start point and the end point is less than the number in parameter.hasNumberOfModifiedColumnsLessThanOrEqualTo
(int number) Verifies that the number of columns with a modification in the values between the start point and the end point is less than or equal to the number in parameter.
-
Method Details
-
hasNumberOfModifiedColumns
Verifies that the number of columns with a modification in the values between the start point and the end point is equals to the number in parameter.Example where the assertion verifies that there are 3 modified columns :
assertThat(changes).change(1).hasNumberOfModifiedColumns(3);
- Parameters:
number
- The expected number of modified columns- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of modified columns is different to the number in parameter.- See Also:
-
hasNumberOfModifiedColumnsGreaterThan
Verifies that the number of columns with a modification in the values between the start point and the end point is greater than the number in parameter.Example where the assertion verifies that there are greater than 3 modified columns :
assertThat(changes).change(1).hasNumberOfModifiedColumnsGreaterThan(3);
- Parameters:
number
- The expected number of modified columns- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of modified columns is less than or equal to the number in parameter.- Since:
- 1.1.0
- See Also:
-
hasNumberOfModifiedColumnsLessThan
Verifies that the number of columns with a modification in the values between the start point and the end point is less than the number in parameter.Example where the assertion verifies that there are less than 3 modified columns :
assertThat(changes).change(1).hasNumberOfModifiedColumnsLessThan(3);
- Parameters:
number
- The expected number of modified columns- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of modified columns is greater than or equal to the number in parameter.- Since:
- 1.1.0
- See Also:
-
hasNumberOfModifiedColumnsGreaterThanOrEqualTo
Verifies that the number of columns with a modification in the values between the start point and the end point is greater than or equal to the number in parameter.Example where the assertion verifies that there are ar least 3 modified columns :
assertThat(changes).change(1).hasNumberOfModifiedColumnsGreaterThanOrEqualTo(3);
- Parameters:
number
- The expected number of modified columns- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of modified columns is less than the number in parameter.- Since:
- 1.1.0
- See Also:
-
hasNumberOfModifiedColumnsLessThanOrEqualTo
Verifies that the number of columns with a modification in the values between the start point and the end point is less than or equal to the number in parameter.Example where the assertion verifies that there are at most 3 modified columns :
assertThat(changes).change(1).hasNumberOfModifiedColumnsLessThanOrEqualTo(3);
- Parameters:
number
- The expected number of modified columns- Returns:
this
assertion object.- Throws:
AssertionError
- If the number of modified columns is greater than the number in parameter.- Since:
- 1.1.0
- See Also:
-
hasModifiedColumns
Verifies that the indexes of columns with a modification in the values between the start point and the end point is equals to the parameters.Example where the assertion verifies that indexes of modified columns are 3 and 5 :
assertThat(changes).change(1).hasModifiedColumns(3, 5);
- Parameters:
indexes
- Indexes of the modified columns.- Returns:
this
assertion object.- Throws:
AssertionError
- If the indexes of the modified columns are different to the indexes in parameters.- See Also:
-
hasModifiedColumns
Verifies that the names of columns with a modification in the values between the start point and the end point is equals to the parameters.Example where the assertion verifies that names of modified columns are "name" and "birth" :
assertThat(changes).change(1).hasModifiedColumns("name", "birth");
- Parameters:
names
- Names of the modified columns.- Returns:
this
assertion object.- Throws:
AssertionError
- If the names of the modified columns are different to the names in parameters.- See Also:
-