Class ChangeAssert
- All Implemented Interfaces:
org.assertj.core.api.Descriptable<ChangeAssert>,AssertOnChangeType<ChangeAssert>,AssertOnDataType<ChangeAssert>,AssertOnModifiedColumns<ChangeAssert>,AssertOnNumberOfColumns<ChangeAssert>,AssertOnPrimaryKey<ChangeAssert>,ChangeElement,Element,Navigation,Origin,OriginWithChanges<ChangesAssert,,ChangeAssert> OriginWithColumnsAndRowsFromChange<ChangesAssert,,ChangeAssert, ChangeColumnAssert, ChangeRowAssert> ToChange<ChangeAssert>,ToChanges<ChangesAssert>,ToColumn<ChangeColumnAssert>,ToColumnFromChange<ChangeColumnAssert>,ToRowFromChange<ChangeRowAssert>
Change.- Author:
- Régis Pouiller
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ChangeThe actual change on which the assertion is.Fields inherited from class org.assertj.db.api.AbstractAssertWithOrigin
originFields inherited from class org.assertj.db.global.AbstractElement
info, myself -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolumn()column(int index) Returns assertion methods on theColumnat theindexin parameter.Returns assertion methods on theColumncorresponding to the column name in parameter.columnAmongTheModifiedOnes(int index) columnAmongTheModifiedOnes(String columnName) hasModifiedColumns(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.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.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.hasPksNames(String... names) Verifies that the columns og the primary key of the rows of the change is the same as the parameters.hasPksValues(Object... values) Verifies that the values of the primary key of the rows of the change are the same as the parameters.Verifies that the type of the change is a creation.Verifies that the type of the change is a deletion.Verifies that the type of the change is a modification.isOfType(ChangeType expected) Verifies that the type of the change is equal to the type in parameter.isOnDataType(DataType expected) Verifies that the data type on which is the change is equal to the type in parameter.Verifies that the data type on which is the change is a request.Verifies that the data type on which is the change is a table.Verifies that the change is on a table with the name in parameter.Returns to level of assertion methods onChanges.Returns assertion methods on theRowat end point.Returns assertion methods on theRowat start point.Methods inherited from class org.assertj.db.api.AbstractAssertWithOriginWithChanges
change, change, changeOfCreation, changeOfCreation, changeOfCreationOnTable, changeOfCreationOnTable, changeOfDeletion, changeOfDeletion, changeOfDeletionOnTable, changeOfDeletionOnTable, changeOfModification, changeOfModification, changeOfModificationOnTable, changeOfModificationOnTable, changeOnTable, changeOnTable, changeOnTableWithPks, ofAll, ofCreation, ofCreationOnTable, ofDeletion, ofDeletionOnTable, ofModification, ofModificationOnTable, onTableMethods inherited from class org.assertj.db.api.AbstractAssertWithOrigin
returnToOriginMethods inherited from class org.assertj.db.global.AbstractElement
as, as, describedAs, describedAs, getInfoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
asMethods inherited from interface org.assertj.db.navigation.ToChange
change, change, changeOfCreation, changeOfCreation, changeOfCreationOnTable, changeOfCreationOnTable, changeOfDeletion, changeOfDeletion, changeOfDeletionOnTable, changeOfDeletionOnTable, changeOfModification, changeOfModification, changeOfModificationOnTable, changeOfModificationOnTable, changeOnTable, changeOnTable, changeOnTableWithPksMethods inherited from interface org.assertj.db.navigation.ToChanges
ofAll, ofCreation, ofCreationOnTable, ofDeletion, ofDeletionOnTable, ofModification, ofModificationOnTable, onTable
-
Field Details
-
change
The actual change on which the assertion is.
-
-
Constructor Details
-
Method Details
-
rowAtStartPoint
Returns assertion methods on theRowat start point.- Specified by:
rowAtStartPointin interfaceToRowFromChange<ChangeRowAssert>- Returns:
- An object to make assertions on the
Rowat start point. - See Also:
-
rowAtEndPoint
Returns assertion methods on theRowat end point.- Specified by:
rowAtEndPointin interfaceToRowFromChange<ChangeRowAssert>- Returns:
- An object to make assertions on the
Rowat end point. - See Also:
-
column
- Specified by:
columnin interfaceToColumn<ChangeColumnAssert>- Returns:
- An object to make assertions on the next
Column. - See Also:
-
column
Returns assertion methods on theColumnat theindexin parameter.- Specified by:
columnin interfaceToColumn<ChangeColumnAssert>- Parameters:
index- The index corresponding to theColumn.- Returns:
- An object to make assertions on the
Column. - See Also:
-
column
Returns assertion methods on theColumncorresponding to the column name in parameter.- Specified by:
columnin interfaceToColumn<ChangeColumnAssert>- Parameters:
columnName- The column name.- Returns:
- An object to make assertions on the
Column. - See Also:
-
columnAmongTheModifiedOnes
- Specified by:
columnAmongTheModifiedOnesin interfaceToColumnFromChange<ChangeColumnAssert>- Returns:
- An object to make assertions on the
Column. - See Also:
-
columnAmongTheModifiedOnes
- Specified by:
columnAmongTheModifiedOnesin interfaceToColumnFromChange<ChangeColumnAssert>- Parameters:
index- The index corresponding to theColumnamong the list of modifiedColumns..- Returns:
- An object to make assertions on the
Column. - See Also:
-
columnAmongTheModifiedOnes
Returns assertion methods on theColumncorresponding to the column name in parameter among the modifiedColumns.- Specified by:
columnAmongTheModifiedOnesin interfaceToColumnFromChange<ChangeColumnAssert>- Parameters:
columnName- The column name.- Returns:
- An object to make assertions on the
Column. - See Also:
-
isOnDataType
Verifies that the data type on which is the change is equal to the type in parameter.Example where the assertion verifies that the change is on data type
TABLE:assertThat(changes).change(1).isOnDataType(DataType.TABLE);- Specified by:
isOnDataTypein interfaceAssertOnDataType<ChangeAssert>- Parameters:
expected- The expected type to compare to.- Returns:
thisassertion object.- See Also:
-
isOnTable
Verifies that the data type on which is the change is a table.Example where the assertion verifies that the change is on data type
TABLE:assertThat(changes).change(1).isOnTable();This assertion method is equivalent to :
xxxxx.isOnDataType(DataType.TABLE);- Specified by:
isOnTablein interfaceAssertOnDataType<ChangeAssert>- Returns:
thisassertion object.- See Also:
-
isOnRequest
Verifies that the data type on which is the change is a request.Example where the assertion verifies that the change is on data type
REQUEST:assertThat(changes).change(1).isOnRequest();This assertion method is equivalent to :
xxxxx.isOnDataType(DataType.REQUEST);- Specified by:
isOnRequestin interfaceAssertOnDataType<ChangeAssert>- Returns:
thisassertion object.- See Also:
-
isOnTable
Verifies that the change is on a table with the name in parameter.Example where the assertion verifies that the change is on
TABLEcalled movie :assertThat(changes).change(1).isOnTable("movie");- Specified by:
isOnTablein interfaceAssertOnDataType<ChangeAssert>- Parameters:
name- The name of the table on which is the change.- Returns:
thisassertion object.- See Also:
-
hasPksNames
Verifies that the columns og the primary key of the rows of the change is the same as the parameters.Example where the assertion verifies that primary key is the column called id :
assertThat(changes).change(1).hasPksNames("id");- Specified by:
hasPksNamesin interfaceAssertOnPrimaryKey<ChangeAssert>- Parameters:
names- The names of the primary key associated with the rows of the change.- Returns:
thisassertion object.- See Also:
-
hasPksValues
Verifies that the values of the primary key of the rows of the change are the same as the parameters.Example where the assertion verifies that primary key have the value 1 :
assertThat(changes).change(1).hasPksValues(1);- Specified by:
hasPksValuesin interfaceAssertOnPrimaryKey<ChangeAssert>- Parameters:
values- The values of the primary key associated with the rows of the change.- Returns:
thisassertion object.- See Also:
-
isOfType
Verifies that the type of the change is equal to the type in parameter.Example where the assertion verifies that the change is of type
CREATION:assertThat(changes).change(1).isOfType(ChangeType.CREATION);- Specified by:
isOfTypein interfaceAssertOnChangeType<ChangeAssert>- Parameters:
expected- The expected type to compare to.- Returns:
thisassertion object.- See Also:
-
isCreation
Verifies that the type of the change is a creation.Example where the assertion verifies that the change is a creation :
assertThat(changes).change(1).isCreation();This assertion method is equivalent to :
xxxxx.isOfType(ChangeType.CREATION);- Specified by:
isCreationin interfaceAssertOnChangeType<ChangeAssert>- Returns:
thisassertion object.- See Also:
-
isModification
Verifies that the type of the change is a modification.Example where the assertion verifies that the change is a modification :
assertThat(changes).change(1).isModification();This assertion method is equivalent to :
xxxxx.isOfType(ChangeType.MODIFICATION);- Specified by:
isModificationin interfaceAssertOnChangeType<ChangeAssert>- Returns:
thisassertion object.- See Also:
-
isDeletion
Verifies that the type of the change is a deletion.Example where the assertion verifies that the change is a deletion :
assertThat(changes).change(1).isDeletion();This assertion method is equivalent to :
xxxxx.isOfType(ChangeType.DELETION);- Specified by:
isDeletionin interfaceAssertOnChangeType<ChangeAssert>- Returns:
thisassertion object.- See Also:
-
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);- Specified by:
hasNumberOfModifiedColumnsin interfaceAssertOnModifiedColumns<ChangeAssert>- Parameters:
number- The expected number of modified columns- Returns:
thisassertion object.- 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);- Specified by:
hasNumberOfModifiedColumnsGreaterThanin interfaceAssertOnModifiedColumns<ChangeAssert>- Parameters:
number- The expected number of modified columns- Returns:
thisassertion object.- 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);- Specified by:
hasNumberOfModifiedColumnsLessThanin interfaceAssertOnModifiedColumns<ChangeAssert>- Parameters:
number- The expected number of modified columns- Returns:
thisassertion object.- 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);- Specified by:
hasNumberOfModifiedColumnsGreaterThanOrEqualToin interfaceAssertOnModifiedColumns<ChangeAssert>- Parameters:
number- The expected number of modified columns- Returns:
thisassertion object.- 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);- Specified by:
hasNumberOfModifiedColumnsLessThanOrEqualToin interfaceAssertOnModifiedColumns<ChangeAssert>- Parameters:
number- The expected number of modified columns- Returns:
thisassertion object.- 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);- Specified by:
hasModifiedColumnsin interfaceAssertOnModifiedColumns<ChangeAssert>- Parameters:
indexes- Indexes of the modified columns.- Returns:
thisassertion object.- 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");- Specified by:
hasModifiedColumnsin interfaceAssertOnModifiedColumns<ChangeAssert>- Parameters:
names- Names of the modified columns.- Returns:
thisassertion 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:
hasNumberOfColumnsin interfaceAssertOnNumberOfColumns<ChangeAssert>- Parameters:
expected- The number to compare to the number of columns.- Returns:
thisassertion 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:
hasNumberOfColumnsGreaterThanin interfaceAssertOnNumberOfColumns<ChangeAssert>- Parameters:
expected- The number to compare to the number of columns.- Returns:
thisassertion 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:
hasNumberOfColumnsLessThanin interfaceAssertOnNumberOfColumns<ChangeAssert>- Parameters:
expected- The number to compare to the number of columns.- Returns:
thisassertion 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:
hasNumberOfColumnsGreaterThanOrEqualToin interfaceAssertOnNumberOfColumns<ChangeAssert>- Parameters:
expected- The number to compare to the number of columns.- Returns:
thisassertion 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:
hasNumberOfColumnsLessThanOrEqualToin interfaceAssertOnNumberOfColumns<ChangeAssert>- Parameters:
expected- The number to compare to the number of columns.- Returns:
thisassertion object.- See Also:
-
returnToChanges
Returns to level of assertion methods onChanges.- Returns:
- a object of assertion methods on
Changes.
-