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>>
- Type Parameters:
D- The class of the actual value (an sub-class ofAbstractDbData).A- The class of the original assertion (an sub-class ofAbstractDbAssert).C- The class of the equivalent column assertion (an sub-class ofAbstractColumnAssert).CV- The class of the equivalent column assertion on the value (an sub-class ofAbstractColumnValueAssert).R- The class of this assertion (an sub-class ofAbstractRowAssert).RV- The class of this assertion on the value (an sub-class ofAbstractRowValueAssert).
- All Implemented Interfaces:
org.assertj.core.api.Descriptable<R>,AssertOnNumberOfColumns<R>,AssertOnRowCondition<R>,AssertOnRowEquality<R>,AssertOnRowNullity<R>,Element,RowElement,Navigation,Origin,OriginWithColumnsAndRows<C,,R> ToColumn<C>,ToRow<R>,ToValue<RV>,ToValueFromRow<RV>
- Direct Known Subclasses:
RequestRowAssert,TableRowAssert
Rows assertions.- Author:
- Régis Pouiller, Julien Roy
-
Field Summary
FieldsFields inherited from class org.assertj.db.api.AbstractAssertWithOrigin
originFields inherited from class org.assertj.db.global.AbstractElement
info, myself -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetValueDescription(int index) Returns the value description.Returns the position of navigation to value.Returns the list of values.hasNumberOfColumns(int expected) Verifies that the number of columns is equal to the number in parameter.hasNumberOfColumnsGreaterThan(int expected) Verifies that the number of columns is greater than the number in parameter.hasNumberOfColumnsGreaterThanOrEqualTo(int expected) Verifies that the number of columns is greater than or equal to the number in parameter.hasNumberOfColumnsLessThan(int expected) Verifies that the number of columns is less than the number in parameter.hasNumberOfColumnsLessThanOrEqualTo(int expected) Verifies that the number of columns is less than or equal to the number in parameter.Verifies that all the values of the row are notnull.Verifies that the values of a row are equal to values in parameter.hasValuesSatisfying(Object... expected) Verifies that the values of a row satisfy to conditions in parameter.Returns assertion methods on the value corresponding to the column name in parameter.Methods inherited from class org.assertj.db.api.AbstractSubAssert
value, valueMethods inherited from class org.assertj.db.api.AbstractAssertWithOriginWithColumnsAndRows
column, column, column, row, rowMethods inherited from class org.assertj.db.api.AbstractAssertWithOrigin
returnToOriginMethods inherited from class org.assertj.db.global.AbstractElement
as, as, describedAs, describedAs, getInfoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as
-
Field Details
-
row
Row on which do the assertion.
-
-
Method Details
-
getValueDescription
Returns the value description.- Specified by:
getValueDescriptionin classAbstractSubAssert<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>> - Parameters:
index- The index of the value.- Returns:
- The description.
-
getValuePosition
Returns the position of navigation to value.- Specified by:
getValuePositionin classAbstractSubAssert<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>> - Returns:
- The position of navigation to value.
-
getValuesList
Returns the list of values.- Specified by:
getValuesListin classAbstractSubAssert<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>> - Returns:
- The list of values.
-
value
Returns assertion methods on the value corresponding to the column name in parameter.- Specified by:
valuein interfaceToValueFromRow<D extends AbstractDbData<D>>- Parameters:
columnName- The column name.- Returns:
- An object to make assertions on the value.
- See Also:
-
hasNumberOfColumns
Verifies that the number of columns is equal to the number in parameter.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);- Specified by:
hasNumberOfColumnsin interfaceAssertOnNumberOfColumns<D extends AbstractDbData<D>>- Parameters:
expected- The number to compare to the number of columns.- Returns:
thisassertion object.- See Also:
-
hasNumberOfColumnsGreaterThan
Verifies that the number of columns is greater than the number in parameter.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);- Specified by:
hasNumberOfColumnsGreaterThanin interfaceAssertOnNumberOfColumns<D extends AbstractDbData<D>>- Parameters:
expected- The number to compare to the number of columns.- Returns:
thisassertion object.- See Also:
-
hasNumberOfColumnsLessThan
Verifies that the number of columns is less than the number in parameter.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);- Specified by:
hasNumberOfColumnsLessThanin interfaceAssertOnNumberOfColumns<D extends AbstractDbData<D>>- Parameters:
expected- The number to compare to the number of columns.- Returns:
thisassertion object.- See Also:
-
hasNumberOfColumnsGreaterThanOrEqualTo
Verifies that the number of columns is greater than or equal to the number in parameter.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);- Specified by:
hasNumberOfColumnsGreaterThanOrEqualToin interfaceAssertOnNumberOfColumns<D extends AbstractDbData<D>>- Parameters:
expected- The number to compare to the number of columns.- Returns:
thisassertion object.- See Also:
-
hasNumberOfColumnsLessThanOrEqualTo
Verifies that the number of columns is less than or equal to the number in parameter.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);- Specified by:
hasNumberOfColumnsLessThanOrEqualToin interfaceAssertOnNumberOfColumns<D extends AbstractDbData<D>>- Parameters:
expected- The number to compare to the number of columns.- Returns:
thisassertion object.- See Also:
-
hasValues
Verifies that the values of a row are equal to values in parameter.Example where the assertion verifies that the values in the first
Rowof theTableare 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));- Specified by:
hasValuesin interfaceAssertOnRowEquality<D extends AbstractDbData<D>>- Parameters:
expected- The expected values.- Returns:
thisassertion object.- See Also:
-
hasOnlyNotNullValues
Verifies that all the values of the row are notnull.Example where the assertion verifies that all the values in the first
Rowof theTableare notnull:assertThat(table).row().hasOnlyNotNullValues();- Specified by:
hasOnlyNotNullValuesin interfaceAssertOnRowNullity<D extends AbstractDbData<D>>- Returns:
thisassertion object.- See Also:
-
hasValuesSatisfying
Verifies that the values of a row satisfy to conditions in parameter.Example where the assertion verifies that the values in the first
Rowof theTablesatisfy to the conditions in parameter :assertThat(table).row().hasValuesSatisfying(new Condition<String>(v -> v.equals("Weaver"), "isWeaver"));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().hasValuesSatisfying(new Condition<String>(v -> v.equals("Weaver"), "isWeaver"));- Specified by:
hasValuesSatisfyingin interfaceAssertOnRowCondition<D extends AbstractDbData<D>>- Parameters:
expected- The expected conditions.- Returns:
thisassertion object.- See Also:
-