Interface ToValueFromRow<V extends ValueElement>

Type Parameters:
V - The class of a assertion on a value (an sub-class of ValueElement).
All Superinterfaces:
Navigation
All Known Subinterfaces:
OriginWithValuesFromRow<CHS,CH,C,R,V>
All Known Implementing Classes:
AbstractRowAssert, AbstractRowOutputter, AbstractRowValueAssert, AbstractRowValueOutputter, ChangeRowAssert, ChangeRowOutputter, ChangeRowValueAssert, ChangeRowValueOutputter, RequestRowAssert, RequestRowOutputter, RequestRowValueAssert, RequestRowValueOutputter, TableRowAssert, TableRowOutputter, TableRowValueAssert, TableRowValueOutputter

public interface ToValueFromRow<V extends ValueElement> extends Navigation
Defines methods to navigate to a value from a Row.

The different methods return an assertion on one value ValueElement.

These methods exists when navigating (at the beginning assertThat()) from changes, from a Table or from a Request.

As shown in the diagram below, if navigating from table or request, it is possible to call the method to navigate to a ValueElement from :

diagram with navigation to column

If navigating from table or request, 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 row (AbstractRowAssert).
So all the lines of code below are equivalent : they point on the value called "name" of first column.

 
 assertThat(table_or_request).row().value("name")......;                                // Point directly on the value called "name"
 assertThat(table_or_request).row().value().returnToRow().value("name")......;          // Use the returnToRow() method
                                                                                        // to return on the row and access to the value called "name"
 assertThat(table_or_request).row().value().value("name")......;                        // Same as precedent but returnToRow() is implicit
 assertThat(table_or_request).row().value(2).value(0).value("name")......;              // Idem
 assertThat(table_or_request).row().value().row().value("name")......;
 // Equivalent to the precedent but with the use of the methods to return to origin
 assertThat(table).row().value().returnToRow().returnToTable().row().value("name")......;
 assertThat(request).row().value().returnToRow().returnToRequest().row().value("name")......;
 
 

As shown in the diagram below, if navigating from changes, it is possible to call the method to navigate to a ValueElement from :

diagram with navigation to column

If navigating from changes, 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 row of a change (ChangeRowAssert).
So all the lines of code below are equivalent : they point on the value called "name" of first row.

 
 assertThat(changes).change().row().value("name")......;                                 // Point directly on the value called "name"
 // Use the returnToRow() method to return on the row and access to the value called "name"
 assertThat(changes).change().row().value().returnToRow().value("name")......;
 assertThat(changes).change().row().value().value("name")......;                         // Same as precedent but returnToRow() is implicit
 assertThat(changes).change().row().value(2).value(0).value("name")......;               // Idem
 assertThat(changes).change().row().value().change(0).row().value("name")......;
 // 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).row().value("name")......;
 
 
Author:
Régis Pouiller
  • Method Summary

    Modifier and Type
    Method
    Description
    value(String columnName)
    Returns assertion methods on the value corresponding to the column name in parameter.