Interface ToRow<R extends RowElement>

Type Parameters:
R - The class of a assertion on a row (an sub-class of RowElement).
All Superinterfaces:
Navigation
All Known Subinterfaces:
OriginWithColumnsAndRows<C,R>
All Known Implementing Classes:
AbstractAssertWithOriginWithColumnsAndRows, AbstractColumnAssert, AbstractColumnOutputter, AbstractColumnValueAssert, AbstractColumnValueOutputter, AbstractDbAssert, AbstractDbOutputter, AbstractOutputterWithOriginWithColumnsAndRows, AbstractRowAssert, AbstractRowOutputter, AbstractRowValueAssert, AbstractRowValueOutputter, AbstractSubAssert, AbstractSubOutputter, AbstractValueAssert, AbstractValueOutputter, RequestAssert, RequestColumnAssert, RequestColumnOutputter, RequestColumnValueAssert, RequestColumnValueOutputter, RequestOutputter, RequestRowAssert, RequestRowOutputter, RequestRowValueAssert, RequestRowValueOutputter, TableAssert, TableColumnAssert, TableColumnOutputter, TableColumnValueAssert, TableColumnValueOutputter, TableOutputter, TableRowAssert, TableRowOutputter, TableRowValueAssert, TableRowValueOutputter

public interface ToRow<R extends RowElement> extends Navigation
Defines methods to navigate to a Row.

The different methods return an assertion on one row RowElement.

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

As shown in the diagram below, it is possible to call the method to navigate to a RowElement from :

diagram with navigation to row

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 table (TableAssert) or on a request (RequestAssert).
So all the lines of code below are equivalent : they point on the row at index 1 (as usual, the list start at index 0).

 
 assertThat(table_or_request).row(1)......;                             // Point directly on the row at index 1
 assertThat(table).row().returnToTable().row()......;                   // Use the returnToTable() method to return on the table
                                                                        // and access to the next/second row of the list
 assertThat(request).row().returnToRequest().row()......;               // Use the returnToRequest() method to return on the request
                                                                        // and access to the next/second row of the list
 assertThat(table_or_request).row().row()......;                        // Same as two precedent but returnToTable() or returnToRequest() is implicit
 assertThat(table_or_request).row().row(1)......;                       // The method with the index can be call too
 assertThat(table_or_request).row(2).row(0).row(1)......;               // Idem
 assertThat(table_or_request).row().value().row()......;
 assertThat(table_or_request).row().value().row(1)......;
 // Equivalent to the precedent but with the use of the methods to return to origin
 assertThat(table).row().value().returnToRow().returnToTable().row(1)......;
 assertThat(request).row().value().returnToRow().returnToRequest().row(1)......;
 
 
Author:
Régis Pouiller
  • Method Summary

    Modifier and Type
    Method
    Description
    row()
    Returns assertion methods on the next Row in the list of Row.
    row(int index)
    Returns assertion methods on the Row at the index in parameter.