public class ChangeAssert extends AbstractAssertWithOriginWithChanges<ChangeAssert,ChangesAssert> implements ChangeElement, OriginWithColumnsAndRowsFromChange<ChangesAssert,ChangeAssert,ChangeColumnAssert,ChangeRowAssert>, AssertOnDataType<ChangeAssert>, AssertOnPrimaryKey<ChangeAssert>, AssertOnChangeType<ChangeAssert>, AssertOnModifiedColumns<ChangeAssert>, AssertOnNumberOfColumns<ChangeAssert>
Change.origininfo, myself| Constructor and Description |
|---|
ChangeAssert(ChangesAssert origin,
Change change)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ChangeColumnAssert |
column()
|
ChangeColumnAssert |
column(int index)
Returns assertion methods on the
Column at the index in parameter. |
ChangeColumnAssert |
column(String columnName)
Returns assertion methods on the
Column corresponding to the column name in parameter. |
ChangeColumnAssert |
columnAmongTheModifiedOnes()
|
ChangeColumnAssert |
columnAmongTheModifiedOnes(int index)
|
ChangeColumnAssert |
columnAmongTheModifiedOnes(String columnName)
|
ChangeAssert |
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.
|
ChangeAssert |
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.
|
ChangeAssert |
hasNumberOfColumns(int expected)
Verifies that the number of columns is equal to the number in parameter.
|
ChangeAssert |
hasNumberOfColumnsGreaterThan(int expected)
Verifies that the number of columns is greater than the number in parameter.
|
ChangeAssert |
hasNumberOfColumnsGreaterThanOrEqualTo(int expected)
Verifies that the number of columns is greater than or equal to the number in parameter.
|
ChangeAssert |
hasNumberOfColumnsLessThan(int expected)
Verifies that the number of columns is less than the number in parameter.
|
ChangeAssert |
hasNumberOfColumnsLessThanOrEqualTo(int expected)
Verifies that the number of columns is less than or equal to the number in parameter.
|
ChangeAssert |
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.
|
ChangeAssert |
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.
|
ChangeAssert |
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.
|
ChangeAssert |
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.
|
ChangeAssert |
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.
|
ChangeAssert |
hasPksNames(String... names)
Verifies that the columns og the primary key of the rows of the change is the same as the parameters.
|
ChangeAssert |
hasPksValues(Object... values)
Verifies that the values of the primary key of the rows of the change are the same as the parameters.
|
ChangeAssert |
isCreation()
Verifies that the type of the change is a creation.
|
ChangeAssert |
isDeletion()
Verifies that the type of the change is a deletion.
|
ChangeAssert |
isModification()
Verifies that the type of the change is a modification.
|
ChangeAssert |
isOfType(ChangeType expected)
Verifies that the type of the change is equal to the type in parameter.
|
ChangeAssert |
isOnDataType(DataType expected)
Verifies that the data type on which is the change is equal to the type in parameter.
|
ChangeAssert |
isOnRequest()
Verifies that the data type on which is the change is a request.
|
ChangeAssert |
isOnTable()
Verifies that the data type on which is the change is a table.
|
ChangeAssert |
isOnTable(String name)
Verifies that the change is on a table with the name in parameter.
|
ChangesAssert |
returnToChanges()
Returns to level of assertion methods on
Changes. |
ChangeRowAssert |
rowAtEndPoint()
Returns assertion methods on the
Row at end point. |
ChangeRowAssert |
rowAtStartPoint()
Returns assertion methods on the
Row at start point. |
change, change, changeOfCreation, changeOfCreation, changeOfCreationOnTable, changeOfCreationOnTable, changeOfDeletion, changeOfDeletion, changeOfDeletionOnTable, changeOfDeletionOnTable, changeOfModification, changeOfModification, changeOfModificationOnTable, changeOfModificationOnTable, changeOnTable, changeOnTable, changeOnTableWithPks, ofAll, ofCreation, ofCreationOnTable, ofDeletion, ofDeletionOnTable, ofModification, ofModificationOnTable, onTablereturnToOriginas, as, describedAs, describedAs, getInfoclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitofAll, ofCreation, ofCreationOnTable, ofDeletion, ofDeletionOnTable, ofModification, ofModificationOnTable, onTablechange, change, changeOfCreation, changeOfCreation, changeOfCreationOnTable, changeOfCreationOnTable, changeOfDeletion, changeOfDeletion, changeOfDeletionOnTable, changeOfDeletionOnTable, changeOfModification, changeOfModification, changeOfModificationOnTable, changeOfModificationOnTable, changeOnTable, changeOnTable, changeOnTableWithPkspublic ChangeAssert(ChangesAssert origin, Change change)
public ChangeRowAssert rowAtStartPoint()
Row at start point.rowAtStartPoint in interface ToRowFromChange<ChangeRowAssert>Row at start point.rowAtStartPoint(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.rowAtStartPoint(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.rowAtStartPoint(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.rowAtStartPoint(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.rowAtStartPoint()public ChangeRowAssert rowAtEndPoint()
Row at end point.rowAtEndPoint in interface ToRowFromChange<ChangeRowAssert>Row at end point.rowAtEndPoint(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.rowAtEndPoint(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.rowAtEndPoint(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.rowAtEndPoint(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.rowAtEndPoint()public ChangeColumnAssert column()
column in interface ToColumn<ChangeColumnAssert>Column.AbstractDbAssert.column(),
AbstractDbAssert.column(),
AbstractAssertWithOriginWithColumnsAndRows.column(),
AbstractAssertWithOriginWithColumnsAndRows.column(),
AbstractAssertWithOriginWithColumnsAndRows.column(),
AbstractAssertWithOriginWithColumnsAndRows.column(),
column(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column()public ChangeColumnAssert column(int index)
Column at the index in parameter.column in interface ToColumn<ChangeColumnAssert>index - The index corresponding to the Column.Column.AbstractDbAssert.column(int),
AbstractDbAssert.column(int),
AbstractAssertWithOriginWithColumnsAndRows.column(int),
AbstractAssertWithOriginWithColumnsAndRows.column(int),
AbstractAssertWithOriginWithColumnsAndRows.column(int),
AbstractAssertWithOriginWithColumnsAndRows.column(int),
column(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(int)public ChangeColumnAssert column(String columnName)
Column corresponding to the column name in parameter.column in interface ToColumn<ChangeColumnAssert>columnName - The column name.Column.AbstractDbAssert.column(String),
AbstractDbAssert.column(String),
AbstractAssertWithOriginWithColumnsAndRows.column(String),
AbstractAssertWithOriginWithColumnsAndRows.column(String),
AbstractAssertWithOriginWithColumnsAndRows.column(String),
AbstractAssertWithOriginWithColumnsAndRows.column(String),
column(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.column(String)public ChangeColumnAssert columnAmongTheModifiedOnes()
columnAmongTheModifiedOnes in interface ToColumnFromChange<ChangeColumnAssert>Column.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String)public ChangeColumnAssert columnAmongTheModifiedOnes(int index)
columnAmongTheModifiedOnes in interface ToColumnFromChange<ChangeColumnAssert>index - The index corresponding to the Column among the list of modified Columns..Column.columnAmongTheModifiedOnes(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(int)public ChangeColumnAssert columnAmongTheModifiedOnes(String columnName)
Column corresponding to the column name in parameter among the modified Columns.columnAmongTheModifiedOnes in interface ToColumnFromChange<ChangeColumnAssert>columnName - The column name.Column.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String)public ChangeAssert isOnDataType(DataType expected)
Example where the assertion verifies that the change is on data type TABLE :
assertThat(changes).change(1).isOnDataType(DataType.TABLE);
isOnDataType in interface AssertOnDataType<ChangeAssert>expected - The expected type to compare to.this assertion object.AssertOnDataType.isOnTable(),
AssertOnDataType.isOnRequest(),
isOnDataType(org.assertj.db.type.DataType)public ChangeAssert isOnTable()
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);
isOnTable in interface AssertOnDataType<ChangeAssert>this assertion object.DataType.TABLE,
isOnTable()public ChangeAssert isOnRequest()
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);
isOnRequest in interface AssertOnDataType<ChangeAssert>this assertion object.DataType.REQUEST,
isOnRequest()public ChangeAssert isOnTable(String name)
Example where the assertion verifies that the change is on TABLE called movie :
assertThat(changes).change(1).isOnTable("movie");
isOnTable in interface AssertOnDataType<ChangeAssert>name - The name of the table on which is the change.this assertion object.isOnTable(String)public ChangeAssert hasPksNames(String... names)
Example where the assertion verifies that primary key is the column called id :
assertThat(changes).change(1).hasPksNames("id");
hasPksNames in interface AssertOnPrimaryKey<ChangeAssert>names - The names of the primary key associated with the rows of the change.this assertion object.hasPksNames(String...)public ChangeAssert hasPksValues(Object... values)
Example where the assertion verifies that primary key have the value 1 :
assertThat(changes).change(1).hasPksValues(1);
hasPksValues in interface AssertOnPrimaryKey<ChangeAssert>values - The values of the primary key associated with the rows of the change.this assertion object.hasPksValues(Object...)public ChangeAssert isOfType(ChangeType expected)
Example where the assertion verifies that the change is of type CREATION :
assertThat(changes).change(1).isOfType(ChangeType.CREATION);
isOfType in interface AssertOnChangeType<ChangeAssert>expected - The expected type to compare to.this assertion object.AssertOnChangeType.isCreation(),
AssertOnChangeType.isModification(),
AssertOnChangeType.isDeletion(),
isOfType(org.assertj.db.type.ChangeType)public ChangeAssert isCreation()
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);
isCreation in interface AssertOnChangeType<ChangeAssert>this assertion object.ChangeType.CREATION,
isCreation()public ChangeAssert isModification()
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);
isModification in interface AssertOnChangeType<ChangeAssert>this assertion object.ChangeType.MODIFICATION,
isModification()public ChangeAssert isDeletion()
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);
isDeletion in interface AssertOnChangeType<ChangeAssert>this assertion object.ChangeType.DELETION,
isDeletion()public ChangeAssert hasNumberOfModifiedColumns(int number)
Example where the assertion verifies that there are 3 modified columns :
assertThat(changes).change(1).hasNumberOfModifiedColumns(3);
hasNumberOfModifiedColumns in interface AssertOnModifiedColumns<ChangeAssert>number - The expected number of modified columnsthis assertion object.hasNumberOfModifiedColumns(int)public ChangeAssert hasNumberOfModifiedColumnsGreaterThan(int number)
Example where the assertion verifies that there are greater than 3 modified columns :
assertThat(changes).change(1).hasNumberOfModifiedColumnsGreaterThan(3);
hasNumberOfModifiedColumnsGreaterThan in interface AssertOnModifiedColumns<ChangeAssert>number - The expected number of modified columnsthis assertion object.hasNumberOfModifiedColumnsGreaterThan(int)public ChangeAssert hasNumberOfModifiedColumnsLessThan(int number)
Example where the assertion verifies that there are less than 3 modified columns :
assertThat(changes).change(1).hasNumberOfModifiedColumnsLessThan(3);
hasNumberOfModifiedColumnsLessThan in interface AssertOnModifiedColumns<ChangeAssert>number - The expected number of modified columnsthis assertion object.hasNumberOfModifiedColumnsLessThan(int)public ChangeAssert hasNumberOfModifiedColumnsGreaterThanOrEqualTo(int number)
Example where the assertion verifies that there are ar least 3 modified columns :
assertThat(changes).change(1).hasNumberOfModifiedColumnsGreaterThanOrEqualTo(3);
hasNumberOfModifiedColumnsGreaterThanOrEqualTo in interface AssertOnModifiedColumns<ChangeAssert>number - The expected number of modified columnsthis assertion object.hasNumberOfModifiedColumnsGreaterThanOrEqualTo(int)public ChangeAssert hasNumberOfModifiedColumnsLessThanOrEqualTo(int number)
Example where the assertion verifies that there are at most 3 modified columns :
assertThat(changes).change(1).hasNumberOfModifiedColumnsLessThanOrEqualTo(3);
hasNumberOfModifiedColumnsLessThanOrEqualTo in interface AssertOnModifiedColumns<ChangeAssert>number - The expected number of modified columnsthis assertion object.hasNumberOfModifiedColumnsLessThanOrEqualTo(int)public ChangeAssert hasModifiedColumns(Integer... indexes)
Example where the assertion verifies that indexes of modified columns are 3 and 5 :
assertThat(changes).change(1).hasModifiedColumns(3, 5);
hasModifiedColumns in interface AssertOnModifiedColumns<ChangeAssert>indexes - Indexes of the modified columns.this assertion object.hasModifiedColumns(Integer...)public ChangeAssert hasModifiedColumns(String... names)
Example where the assertion verifies that names of modified columns are "name" and "birth" :
assertThat(changes).change(1).hasModifiedColumns("name", "birth");
hasModifiedColumns in interface AssertOnModifiedColumns<ChangeAssert>names - Names of the modified columns.this assertion object.hasModifiedColumns(String...)public ChangeAssert hasNumberOfColumns(int expected)
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);
hasNumberOfColumns in interface AssertOnNumberOfColumns<ChangeAssert>expected - The number to compare to the number of columns.this assertion object.AbstractDbAssert.hasNumberOfColumns(int),
AbstractRowAssert.hasNumberOfColumns(int),
ChangeRowAssert.hasNumberOfColumns(int)public ChangeAssert hasNumberOfColumnsGreaterThan(int expected)
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);
hasNumberOfColumnsGreaterThan in interface AssertOnNumberOfColumns<ChangeAssert>expected - The number to compare to the number of columns.this assertion object.AbstractDbAssert.hasNumberOfColumnsGreaterThan(int),
AbstractRowAssert.hasNumberOfColumnsGreaterThan(int),
ChangeRowAssert.hasNumberOfColumnsGreaterThan(int)public ChangeAssert hasNumberOfColumnsLessThan(int expected)
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);
hasNumberOfColumnsLessThan in interface AssertOnNumberOfColumns<ChangeAssert>expected - The number to compare to the number of columns.this assertion object.AbstractDbAssert.hasNumberOfColumnsLessThan(int),
AbstractRowAssert.hasNumberOfColumnsLessThan(int),
ChangeRowAssert.hasNumberOfColumnsLessThan(int)public ChangeAssert hasNumberOfColumnsGreaterThanOrEqualTo(int expected)
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);
hasNumberOfColumnsGreaterThanOrEqualTo in interface AssertOnNumberOfColumns<ChangeAssert>expected - The number to compare to the number of columns.this assertion object.AbstractDbAssert.hasNumberOfColumnsGreaterThanOrEqualTo(int),
AbstractRowAssert.hasNumberOfColumnsGreaterThanOrEqualTo(int),
ChangeRowAssert.hasNumberOfColumnsGreaterThanOrEqualTo(int)public ChangeAssert hasNumberOfColumnsLessThanOrEqualTo(int expected)
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);
hasNumberOfColumnsLessThanOrEqualTo in interface AssertOnNumberOfColumns<ChangeAssert>expected - The number to compare to the number of columns.this assertion object.AbstractDbAssert.hasNumberOfColumnsLessThanOrEqualTo(int),
AbstractRowAssert.hasNumberOfColumnsLessThanOrEqualTo(int),
ChangeRowAssert.hasNumberOfColumnsLessThanOrEqualTo(int)public ChangesAssert returnToChanges()
Changes.Changes.Copyright © 2015–2017 AssertJ. All rights reserved.