R - The class of a assertion on a row (an sub-class of RowElement).public interface ToRow<R extends RowElement> extends Navigation
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 :
TableAssert)RequestAssert)AbstractColumnAssert)AbstractColumnValueAssert)AbstractRowAssert)AbstractRowValueAssert)
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)......;
| Modifier and Type | Method and Description |
|---|---|
R |
row()
|
R |
row(int index)
Returns assertion methods on the
Row at the index in parameter. |
R row()
Row.AssertJDBException - If there are no more Row in the list of Rows.AbstractDbAssert.row(),
AbstractDbAssert.row(),
AbstractAssertWithOriginWithColumnsAndRows.row(),
AbstractAssertWithOriginWithColumnsAndRows.row(),
AbstractAssertWithOriginWithColumnsAndRows.row(),
AbstractAssertWithOriginWithColumnsAndRows.row()R row(int index)
Row at the index in parameter.index - The index corresponding to the Row.Row.AssertJDBException - If the index is out of the bounds.AbstractDbAssert.row(int),
AbstractDbAssert.row(int),
AbstractAssertWithOriginWithColumnsAndRows.row(int),
AbstractAssertWithOriginWithColumnsAndRows.row(int),
AbstractAssertWithOriginWithColumnsAndRows.row(int),
AbstractAssertWithOriginWithColumnsAndRows.row(int)Copyright © 2020 AssertJ. All rights reserved.