C - The class of a assertion on a column (an sub-class of ColumnElement).public interface ToColumnFromChange<C extends ColumnElement> extends Navigation
Column from a Change.
The different methods return an assertion on one column ColumnElement.
These methods exists when navigating (at the beginning assertThat()) from changes.
The difference with ToColumn is that ToColumn
allows to navigate in all the columns of a Change and the methods
of ToColumnFromChange count only the columns
with a modification between the start point and the end point.
As shown in the diagram below, it is possible to call the method to navigate to a ColumnElement from :
ChangeAssert)ChangeColumnAssert)ChangeColumnValueAssert)ChangeRowAssert)ChangeRowValueAssert)
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) among the modified columns.
assertThat(changes).change().columnAmongTheModifiedOnes(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().columnAmongTheModifiedOnes().returnToChange().columnAmongTheModifiedOnes()......;
assertThat(changes).change().columnAmongTheModifiedOnes().columnAmongTheModifiedOnes()......; // Same as precedent but returnToChange() is implicit
assertThat(changes).change().column().columnAmongTheModifiedOnes(1)......; // The method with the index can be call too
assertThat(changes).change().columnAmongTheModifiedOnes(2).column(0).columnAmongTheModifiedOnes(1)......; // Idem
assertThat(changes).change().columnAmongTheModifiedOnes().value().columnAmongTheModifiedOnes()......;
assertThat(changes).change().column().value().columnAmongTheModifiedOnes(1)......;
// Equivalent to the precedent but with the use of the methods to return to origin
assertThat(changes).change().columnAmongTheModifiedOnes().value().returnToColumn().returnToChange().columnAmongTheModifiedOnes(1)......;
| Modifier and Type | Method and Description |
|---|---|
C |
columnAmongTheModifiedOnes()
|
C |
columnAmongTheModifiedOnes(int index)
|
C |
columnAmongTheModifiedOnes(String columnName)
|
C columnAmongTheModifiedOnes()
Column.AssertJDBException - If there are no more Column among the list of modified Columns.ChangeAssert.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String)C columnAmongTheModifiedOnes(int index)
index - The index corresponding to the Column among the list of modified Columns..Column.AssertJDBException - If the index is out of the bounds.ChangeAssert.columnAmongTheModifiedOnes(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(int),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(int)C columnAmongTheModifiedOnes(String columnName)
Column corresponding to the column name in parameter among the modified Columns.columnName - The column name.Column.NullPointerException - If the column name in parameter is null.AssertJDBException - If there is no column with this name among the list of modified Columns.ChangeAssert.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String),
AbstractAssertWithOriginWithColumnsAndRowsFromChange.columnAmongTheModifiedOnes(String)Copyright © 2015–2017 AssertJ. All rights reserved.