Package org.assertj.db.navigation
Interface ToRowFromChange<R extends RowElement>
- Type Parameters:
R- The class of a assertion on a row (an sub-class ofRowElement).
- All Superinterfaces:
Navigation
- All Known Subinterfaces:
OriginWithColumnsAndRowsFromChange<CHS,,CH, C, R> OriginWithValuesFromColumn<CHS,,CH, C, R, V> OriginWithValuesFromRow<CHS,CH, C, R, V>
- All Known Implementing Classes:
AbstractAssertWithOriginWithColumnsAndRowsFromChange,AbstractAssertWithValues,AbstractOutputterWithOriginWithColumnsAndRowsFromChange,AbstractOutputterWithValues,ChangeAssert,ChangeColumnAssert,ChangeColumnOutputter,ChangeColumnValueAssert,ChangeColumnValueOutputter,ChangeOutputter,ChangeRowAssert,ChangeRowOutputter,ChangeRowValueAssert,ChangeRowValueOutputter
Defines methods to navigate to a
Row from a Change.
The different methods return an assertion on one row RowElement.
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 a RowElement from :
- a 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 a change (ChangeAssert).
So all the lines of code below are equivalent : they point on the row at end point.
assertThat(changes).change().rowAtEndPoint()......; // Point directly on the row at end point
// Use the returnToChange() method to return on the change and access to the row at end point
assertThat(changes).change().rowAtStartPoint().returnToChange().rowAtEndPoint()......;
assertThat(changes).change().rowAtStartPoint().rowAtEndPoint()......; // Same as precedent but returnToChange() is implicit
assertThat(changes).change().column().rowAtEndPoint()......; // The method can be call from a column
assertThat(changes).change().column().value().rowAtEndPoint()......;
assertThat(changes).change().column(1).value().rowAtEndPoint()......;
// Equivalent to the precedent but with the use of the methods to return to origin
assertThat(changes).change().column(1).value().returnToColumn().returnToChange().rowAtEndPoint()......;
- Author:
- Régis Pouiller
-
Method Details
-
rowAtStartPoint
R rowAtStartPoint()Returns assertion methods on theRowat start point.- Returns:
- An object to make assertions on the
Rowat start point. - See Also:
-
rowAtEndPoint
R rowAtEndPoint()Returns assertion methods on theRowat end point.- Returns:
- An object to make assertions on the
Rowat end point. - See Also:
-