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 RowAssert, ToValueFromRow<RV>, AssertOnRowEquality<R>, AssertOnNumberOfColumns<R>
Rows assertions.origininfo, myself| Modifier and Type | Method and Description |
|---|---|
protected RV |
getValueAssertInstance(Class<RV> valueAssertType,
int index,
Object value)
Gets an instance of value assert corresponding to the index and the value.
|
protected List<Object> |
getValuesList()
Returns the list of values.
|
R |
hasNumberOfColumns(int expected)
Verifies that the number of columns is equal to the number in parameter.
|
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.
|
getValue, getValueAssertInstance, value, valuecolumn, column, column, row, rowreturnToOriginas, as, describedAs, describedAsprotected RV getValueAssertInstance(Class<RV> valueAssertType, int index, Object value) throws Exception
getValueAssertInstance 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>>valueAssertType - Class of the assertion on the value : a sub-class of AbstractValueAssert.index - Index of the value on which is the instance of value assert.value - Value on which is the instance of value assert.Exception - Exception during the instantiation.protected List<Object> 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 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...)Copyright © 2015 AssertJ. All Rights Reserved.