Interface ToColumn<C extends ColumnElement>

Type Parameters:
C - The class of a assertion on a column (an sub-class of ColumnElement).
All Superinterfaces:
Navigation
All Known Subinterfaces:
OriginWithColumnsAndRows<C,R>, OriginWithColumnsAndRowsFromChange<CHS,CH,C,R>, OriginWithValuesFromColumn<CHS,CH,C,R,V>, OriginWithValuesFromRow<CHS,CH,C,R,V>
All Known Implementing Classes:
AbstractAssertWithOriginWithColumnsAndRows, AbstractAssertWithOriginWithColumnsAndRowsFromChange, AbstractAssertWithValues, AbstractColumnAssert, AbstractColumnOutputter, AbstractColumnValueAssert, AbstractColumnValueOutputter, AbstractDbAssert, AbstractDbOutputter, AbstractOutputterWithOriginWithColumnsAndRows, AbstractOutputterWithOriginWithColumnsAndRowsFromChange, AbstractOutputterWithValues, AbstractRowAssert, AbstractRowOutputter, AbstractRowValueAssert, AbstractRowValueOutputter, AbstractSubAssert, AbstractSubOutputter, AbstractValueAssert, AbstractValueOutputter, ChangeAssert, ChangeColumnAssert, ChangeColumnOutputter, ChangeColumnValueAssert, ChangeColumnValueOutputter, ChangeOutputter, ChangeRowAssert, ChangeRowOutputter, ChangeRowValueAssert, ChangeRowValueOutputter, RequestAssert, RequestColumnAssert, RequestColumnOutputter, RequestColumnValueAssert, RequestColumnValueOutputter, RequestOutputter, RequestRowAssert, RequestRowOutputter, RequestRowValueAssert, RequestRowValueOutputter, TableAssert, TableColumnAssert, TableColumnOutputter, TableColumnValueAssert, TableColumnValueOutputter, TableOutputter, TableRowAssert, TableRowOutputter, TableRowValueAssert, TableRowValueOutputter

public interface ToColumn<C extends ColumnElement> extends Navigation
Defines methods to navigate to a Column.

The different methods return an assertion on one column ColumnElement.

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

 
 assertThat(table_or_request).column(1)......;                                   // Point directly on the column at index 1
 assertThat(table_or_request).column().returnToColumn().column()......;          // Use the returnToColumn() method to return to origin
                                                                                 // to return on the table or request and access to the next/second column of the list
 assertThat(table_or_request).column().column()......;                           // Same as precedent but returnToColumn() is implicit
 assertThat(table_or_request).column().column(1)......;                          // The method with the index can be call too
 assertThat(table_or_request).column(2).column(0).column(1)......;               // Idem
 assertThat(table_or_request).column().value().column()......;
 assertThat(table_or_request).column().value().column(1)......;
 // Equivalent to the precedent but with the use of the methods to return to origin
 assertThat(table_or_request).column().value().returnToColumn().returnToChange().column(1)......;
 
 

As shown in the diagram below, if navigating from changes, it is possible to call the method to navigate to a ColumnElement 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 change (ChangeAssert).
So all the lines of code below are equivalent : they point on the column at index 1 (as usual, the list start at index 0).

 
 assertThat(changes).change().column(1)......;                                   // Point directly on the column at index 1
 // Use the returnToChange() method to return on the change and access to the next/second column of the list
 assertThat(changes).change().column().returnToChange().column()......;
 assertThat(changes).change().column().column()......;                           // Same as precedent but returnToChange() is implicit
 assertThat(changes).change().column().column(1)......;                          // The method with the index can be call too
 assertThat(changes).change().column(2).column(0).column(1)......;               // Idem
 assertThat(changes).change().column().value().column()......;
 assertThat(changes).change().column().value().column(1)......;
 // Equivalent to the precedent but with the use of the methods to return to origin
 assertThat(changes).change().column().value().returnToColumn().returnToChange().column(1)......;
 
 
Author:
Régis Pouiller
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns assertion methods on the next Column in the list of Columns.
    column(int index)
    Returns assertion methods on the Column at the index in parameter.
    column(String columnName)
    Returns assertion methods on the Column corresponding to the column name in parameter.