Package org.assertj.db.navigation
Interface ToValueFromColumn<V extends ValueElement>
- Type Parameters:
V- The class of a assertion on a value (an sub-class ofValueElement).
- All Superinterfaces:
Navigation
- All Known Subinterfaces:
OriginWithValuesFromColumn<CHS,CH, C, R, V>
- All Known Implementing Classes:
ChangeColumnAssert,ChangeColumnOutputter,ChangeColumnValueAssert,ChangeColumnValueOutputter
Defines methods to navigate to a value from a
Column
(a column from a Change}.
The different methods return an assertion on one value ValueElement.
These methods exists when navigating (at the beginning assertThat()) from changes.
As shown in the diagram below, if navigating from changes, it is possible to call the method to navigate to a ColumnElement from :
- a column of a change (
ChangeColumnAssert) - a value of a column of a change (
ChangeColumnValueAssert)
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 column of a change (ChangeAssert).
So all the lines of code below are equivalent : they point on the value at end point of first column.
assertThat(changes).change().column().valueAtEndPoint()......; // Point directly on the value at end point
// Use the returnToColumn() method to return on the column and access to the value at the end point
assertThat(changes).change().column().valueAtStartPoint().returnToColumn().valueAtEndPoint()......;
assertThat(changes).change().column().valueAtStartPoint().valueAtEndPoint()......; // Same as precedent but returnToColumn() is implicit
assertThat(changes).change().row().value().change(0).column().valueAtEndPoint()......;
// Equivalent to the precedent but with the use of the methods to return to origin
assertThat(changes).change().row().value().returnToRow().returnToChange().returnToChanges().change(0).column().value(1)......;
- Author:
- Régis Pouiller
-
Method Summary
Modifier and TypeMethodDescriptionReturns assertion methods on the value at the end point.Returns assertion methods on the value at the start point.
-
Method Details
-
valueAtStartPoint
V valueAtStartPoint()Returns assertion methods on the value at the start point.- Returns:
- An object to make assertions on the next value.
- See Also:
-
valueAtEndPoint
V valueAtEndPoint()Returns assertion methods on the value at the end point.- Returns:
- An object to make assertions on the value.
- See Also:
-