D - The class of the actual value (an sub-class of AbstractDbData).A - The class of the original assertion (an sub-class of AbstractDbAssert).C - The class of the equivalent column assertion (an sub-class of AbstractColumnAssert).CV - The class of the equivalent column assertion on the value (an sub-class of AbstractColumnValueAssert
).R - The class of this assertion (an sub-class of AbstractRowAssert).RV - The class of this assertion on the value (an sub-class of AbstractRowValueAssert).public abstract class AbstractRowAssert<D extends AbstractDbData<D>,A extends AbstractDbAssert<D,A,C,CV,R,RV>,C extends AbstractColumnAssert<D,A,C,CV,R,RV>,CV extends AbstractColumnValueAssert<D,A,C,CV,R,RV>,R extends AbstractRowAssert<D,A,C,CV,R,RV>,RV extends AbstractRowValueAssert<D,A,C,CV,R,RV>> extends AbstractSubAssert<D,A,R,RV,C,CV,R,RV> implements RowElement, ToValueFromRow<RV>, AssertOnRowEquality<R>, AssertOnNumberOfColumns<R>, AssertOnRowNullity<R>
Rows assertions.origininfo, myself| Modifier and Type | Method and Description |
|---|---|
protected String |
getValueDescription(int index)
Returns the value description.
|
protected Position<R,RV,Value> |
getValuePosition()
Returns the position of navigation to value.
|
protected List<Value> |
getValuesList()
Returns the list of values.
|
R |
hasNumberOfColumns(int expected)
Verifies that the number of columns is equal to the number in parameter.
|
R |
hasNumberOfColumnsGreaterThan(int expected)
Verifies that the number of columns is greater than the number in parameter.
|
R |
hasNumberOfColumnsGreaterThanOrEqualTo(int expected)
Verifies that the number of columns is greater than or equal to the number in parameter.
|
R |
hasNumberOfColumnsLessThan(int expected)
Verifies that the number of columns is less than the number in parameter.
|
R |
hasNumberOfColumnsLessThanOrEqualTo(int expected)
Verifies that the number of columns is less than or equal to the number in parameter.
|
R |
hasOnlyNotNullValues()
Verifies that all the values of the row are not
null. |
R |
hasValues(Object... expected)
Verifies that the values of a row are equal to values in parameter.
|
RV |
value(String columnName)
Returns assertion methods on the value corresponding to the column name in parameter.
|
value, valuecolumn, column, column, row, rowreturnToOriginas, as, describedAs, describedAs, getInfoprotected String getValueDescription(int index)
getValueDescription in class AbstractSubAssert<D extends AbstractDbData<D>,A extends AbstractDbAssert<D,A,C,CV,R,RV>,R extends AbstractRowAssert<D,A,C,CV,R,RV>,RV extends AbstractRowValueAssert<D,A,C,CV,R,RV>,C extends AbstractColumnAssert<D,A,C,CV,R,RV>,CV extends AbstractColumnValueAssert<D,A,C,CV,R,RV>,R extends AbstractRowAssert<D,A,C,CV,R,RV>,RV extends AbstractRowValueAssert<D,A,C,CV,R,RV>>index - The index of the value.protected Position<R,RV,Value> getValuePosition()
getValuePosition in class AbstractSubAssert<D extends AbstractDbData<D>,A extends AbstractDbAssert<D,A,C,CV,R,RV>,R extends AbstractRowAssert<D,A,C,CV,R,RV>,RV extends AbstractRowValueAssert<D,A,C,CV,R,RV>,C extends AbstractColumnAssert<D,A,C,CV,R,RV>,CV extends AbstractColumnValueAssert<D,A,C,CV,R,RV>,R extends AbstractRowAssert<D,A,C,CV,R,RV>,RV extends AbstractRowValueAssert<D,A,C,CV,R,RV>>protected List<Value> getValuesList()
getValuesList in class AbstractSubAssert<D extends AbstractDbData<D>,A extends AbstractDbAssert<D,A,C,CV,R,RV>,R extends AbstractRowAssert<D,A,C,CV,R,RV>,RV extends AbstractRowValueAssert<D,A,C,CV,R,RV>,C extends AbstractColumnAssert<D,A,C,CV,R,RV>,CV extends AbstractColumnValueAssert<D,A,C,CV,R,RV>,R extends AbstractRowAssert<D,A,C,CV,R,RV>,RV extends AbstractRowValueAssert<D,A,C,CV,R,RV>>public RV value(String columnName)
value in interface ToValueFromRow<RV extends AbstractRowValueAssert<D,A,C,CV,R,RV>>columnName - The column name.value(String),
AbstractRowValueAssert.value(String),
ChangeRowAssert.value(String),
ChangeRowValueAssert.value(String)public R hasNumberOfColumns(int expected)
Example where the assertion verifies that the table has 8 columns :
assertThat(table).hasNumberOfColumns(8);
Example where the assertion verifies that the first row of the table has 8 columns :
assertThat(table).row().hasNumberOfColumns(8);
Example where the assertion verifies that the row at end point of the first change has 8 columns :
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumns(8);
hasNumberOfColumns in interface AssertOnNumberOfColumns<R extends AbstractRowAssert<D,A,C,CV,R,RV>>expected - The number to compare to the number of columns.this assertion object.AbstractDbAssert.hasNumberOfColumns(int),
hasNumberOfColumns(int),
ChangeRowAssert.hasNumberOfColumns(int)public R hasNumberOfColumnsGreaterThan(int expected)
Example where the assertion verifies that the table has more than 8 columns :
assertThat(table).hasNumberOfColumnsGreaterThan(8);
Example where the assertion verifies that the first row of the table has more than 8 columns :
assertThat(table).row().hasNumberOfColumnsGreaterThan(8);
Example where the assertion verifies that the row at end point of the first change has more than 8 columns :
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsGreaterThan(8);
hasNumberOfColumnsGreaterThan in interface AssertOnNumberOfColumns<R extends AbstractRowAssert<D,A,C,CV,R,RV>>expected - The number to compare to the number of columns.this assertion object.AbstractDbAssert.hasNumberOfColumnsGreaterThan(int),
hasNumberOfColumnsGreaterThan(int),
ChangeRowAssert.hasNumberOfColumnsGreaterThan(int)public R hasNumberOfColumnsLessThan(int expected)
Example where the assertion verifies that the table has less than 8 columns :
assertThat(table).hasNumberOfColumnsLessThan(8);
Example where the assertion verifies that the first row of the table has less than 8 columns :
assertThat(table).row().hasNumberOfColumnsLessThan(8);
Example where the assertion verifies that the row at end point of the first change has less than 8 columns :
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsLessThan(8);
hasNumberOfColumnsLessThan in interface AssertOnNumberOfColumns<R extends AbstractRowAssert<D,A,C,CV,R,RV>>expected - The number to compare to the number of columns.this assertion object.AbstractDbAssert.hasNumberOfColumnsLessThan(int),
hasNumberOfColumnsLessThan(int),
ChangeRowAssert.hasNumberOfColumnsLessThan(int)public R hasNumberOfColumnsGreaterThanOrEqualTo(int expected)
Example where the assertion verifies that the table has at least 8 columns :
assertThat(table).hasNumberOfColumnsGreaterThanOrEqualTo(8);
Example where the assertion verifies that the first row of the table has at least 8 columns :
assertThat(table).row().hasNumberOfColumnsGreaterThanOrEqualTo(8);
Example where the assertion verifies that the row at end point of the first change has at least 8 columns :
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsGreaterThanOrEqualTo(8);
hasNumberOfColumnsGreaterThanOrEqualTo in interface AssertOnNumberOfColumns<R extends AbstractRowAssert<D,A,C,CV,R,RV>>expected - The number to compare to the number of columns.this assertion object.AbstractDbAssert.hasNumberOfColumnsGreaterThanOrEqualTo(int),
hasNumberOfColumnsGreaterThanOrEqualTo(int),
ChangeRowAssert.hasNumberOfColumnsGreaterThanOrEqualTo(int)public R hasNumberOfColumnsLessThanOrEqualTo(int expected)
Example where the assertion verifies that the table has at most 8 columns :
assertThat(table).hasNumberOfColumnsLessThanOrEqualTo(8);
Example where the assertion verifies that the first row of the table has at most 8 columns :
assertThat(table).row().hasNumberOfColumnsLessThanOrEqualTo(8);
Example where the assertion verifies that the row at end point of the first change has at most 8 columns :
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsLessThanOrEqualTo(8);
hasNumberOfColumnsLessThanOrEqualTo in interface AssertOnNumberOfColumns<R extends AbstractRowAssert<D,A,C,CV,R,RV>>expected - The number to compare to the number of columns.this assertion object.AbstractDbAssert.hasNumberOfColumnsLessThanOrEqualTo(int),
hasNumberOfColumnsLessThanOrEqualTo(int),
ChangeRowAssert.hasNumberOfColumnsLessThanOrEqualTo(int)public R hasValues(Object... expected)
Example where the assertion verifies that the values in the first Row of the Table are equal to the
values in parameter :
assertThat(table).row().hasValues(1, "Text", TimeValue.of(9, 1));
Example where the assertion verifies that the values of the row at end point of the first change are equal to the values in parameter :
assertThat(changes).change().rowAtEndPoint().hasValues(1, "Text", TimeValue.of(9, 1));
hasValues in interface AssertOnRowEquality<R extends AbstractRowAssert<D,A,C,CV,R,RV>>expected - The expected values.this assertion object.hasValues(Object...),
ChangeRowAssert.hasValues(Object...)public R hasOnlyNotNullValues()
null.
Example where the assertion verifies that all the values in the first Row of the Table are not
null :
assertThat(table).row().hasOnlyNotNullValues();
hasOnlyNotNullValues in interface AssertOnRowNullity<R extends AbstractRowAssert<D,A,C,CV,R,RV>>this assertion object.hasOnlyNotNullValues()Copyright © 2015–2017 AssertJ. All rights reserved.