Package org.assertj.db.navigation
Interface ToChanges<CHS extends ChangesElement>
- Type Parameters:
CHS
- The class of a assertion on changes (an sub-class ofChangesElement
).
- All Superinterfaces:
Navigation
- All Known Subinterfaces:
OriginWithChanges<CHS,
,CH> OriginWithColumnsAndRowsFromChange<CHS,
,CH, C, R> OriginWithValuesFromColumn<CHS,
,CH, C, R, V> OriginWithValuesFromRow<CHS,
CH, C, R, V>
- All Known Implementing Classes:
AbstractAssertWithOriginWithChanges
,AbstractAssertWithOriginWithColumnsAndRowsFromChange
,AbstractAssertWithValues
,AbstractOutputterWithOriginWithChanges
,AbstractOutputterWithOriginWithColumnsAndRowsFromChange
,AbstractOutputterWithValues
,ChangeAssert
,ChangeColumnAssert
,ChangeColumnOutputter
,ChangeColumnValueAssert
,ChangeColumnValueOutputter
,ChangeOutputter
,ChangeRowAssert
,ChangeRowOutputter
,ChangeRowValueAssert
,ChangeRowValueOutputter
,ChangesAssert
,ChangesOutputter
Defines methods to navigate to changes or to a
Change
.
The different methods return an assertion on changes ChangesAssert
.
These methods exists when navigating (at the beginning assertThat()
) from changes.
As shown in the diagram below, it is possible to call the method to navigate to changes from :
- changes (
ChangesAssert
) - another change (
ChangeAssert
) - a column of a change (
ChangeColumnAssert
) - a value of a column of a change (
ChangeColumnValueAssert
) - a row of a change (
ChangeRowAssert
) - a value of a row of a change (
ChangeRowValueAssert
)
It is important to keep in mind that the methods are executed from the point of view of the last instance with assertion methods on changes (ChangesAssert
).
So all the lines of code below are equivalent : they point on all the changes.
assertThat(changes)......; // Point on all the changes
assertThat(changes).ofAll()......; // Idem
assertThat(changes).change().returnToChanges().ofAll()......; // Use the returnToChanges() to return to origin
// to return on the changes and access to the next/second change of the list
assertThat(changes).change().ofAll()......; // Same as precedent but returnToChanges() is implicit
assertThat(changes).change().column().ofAll()......;
assertThat(changes).change().rowAtEndPoint().ofAll()......;
assertThat(changes).change().column().value().ofAll()......;
assertThat(changes).change().rowAtEndPoint().value().ofAll()......;
// Equivalent to the precedent but with the use of the methods to return to origin
assertThat(changes).change().rowAtEndPoint().value().returnToRow().returnToChange().returnToChanges().ofAll()......;
- Author:
- Régis Pouiller
-
Method Summary
Modifier and TypeMethodDescriptionofAll()
Returns an assertion of all the changes.Returns an assertion of the changes of creation (ChangeType.CREATION
).ofCreationOnTable
(String tableName) Returns an assertion of the changes of creation (ChangeType.CREATION
) on a table.Returns an assertion of the changes of deletion (ChangeType.DELETION
).ofDeletionOnTable
(String tableName) Returns an assertion of the changes of deletion (ChangeType.DELETION
) on a table.Returns an assertion of the changes of modification (ChangeType.MODIFICATION
).ofModificationOnTable
(String tableName) Returns an assertion of the changes of modification (ChangeType.MODIFICATION
) on a table.Returns an assertion of the changes on a table.
-
Method Details
-
ofAll
CHS ofAll()Returns an assertion of all the changes.- Returns:
- An object to make assertions on all the changes.
- See Also:
-
ofCreation
CHS ofCreation()Returns an assertion of the changes of creation (ChangeType.CREATION
).- Returns:
- An object to make assertions on the changes of creation (
ChangeType.CREATION
). - See Also:
-
ofModification
CHS ofModification()Returns an assertion of the changes of modification (ChangeType.MODIFICATION
).- Returns:
- An object to make assertions on the changes of modification (
ChangeType.MODIFICATION
). - See Also:
-
ofDeletion
CHS ofDeletion()Returns an assertion of the changes of deletion (ChangeType.DELETION
).- Returns:
- An object to make assertions on the changes of deletion (
ChangeType.DELETION
). - See Also:
-
ofCreationOnTable
Returns an assertion of the changes of creation (ChangeType.CREATION
) on a table.- Parameters:
tableName
- The table name- Returns:
- An object to make assertions on the changes of creation (
ChangeType.CREATION
) on the table. - See Also:
-
ofModificationOnTable
Returns an assertion of the changes of modification (ChangeType.MODIFICATION
) on a table.- Parameters:
tableName
- The table name- Returns:
- An object to make assertions on the changes of modification (
ChangeType.MODIFICATION
) on the table. - See Also:
-
ofDeletionOnTable
Returns an assertion of the changes of deletion (ChangeType.DELETION
) on a table.- Parameters:
tableName
- The table name- Returns:
- An object to make assertions on the changes of deletion (
ChangeType.DELETION
) on the table. - See Also:
-
onTable
Returns an assertion of the changes on a table.- Parameters:
tableName
- The table name- Returns:
- An object to make assertions on the changes on the table.
- See Also:
-