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 this assertion (an sub-class of AbstractColumnAssert
).CV
- The class of this assertion on the value (an sub-class of AbstractColumnValueAssert
).R
- The class of the equivalent row assertion (an sub-class of AbstractRowAssert
).RV
- The class of the equivalent row assertion on the value (an sub-class of AbstractRowValueAssert
).public abstract class AbstractColumnAssert<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,C,CV,C,CV,R,RV> implements ColumnElement, AssertOnColumnClass<C>, AssertOnColumnEquality<C>, AssertOnColumnContent<C>, AssertOnNumberOfRows<C>, AssertOnColumnName<C>, AssertOnColumnType<C>, AssertOnColumnNullity<C>
Column
s assertions.Modifier and Type | Field and Description |
---|---|
protected Column |
column
Column on which do the assertion.
|
protected Position<C,CV,Value> |
valuePosition
Position of navigation to value.
|
origin
info, myself
Modifier and Type | Method and Description |
---|---|
C |
containsValues(Boolean... expected)
Verifies that the values of a column contains booleans.
|
C |
containsValues(byte[]... expected)
Verifies that the values of a column contains bytes.
|
C |
containsValues(Character... expected)
Verifies that the values of a column contains characters.
|
C |
containsValues(DateTimeValue... expected)
Verifies that the values of a column contains date/time values.
|
C |
containsValues(DateValue... expected)
Verifies that the values of a column contains date values.
|
C |
containsValues(Number... expected)
Verifies that the values of a column contains numbers.
|
C |
containsValues(Object... expected)
Verifies that the values of a column contains objects.
|
C |
containsValues(String... expected)
Verifies that the values of a column contains texts.
|
C |
containsValues(TimeValue... expected)
Verifies that the values of a column contains time values.
|
C |
containsValues(UUID... expected)
Verifies that the values of a column containsUUIDs.
|
protected String |
getValueDescription(int index)
Returns the value description.
|
protected Position<C,CV,Value> |
getValuePosition()
Returns the position of navigation to value.
|
protected List<Value> |
getValuesList()
Returns the list of values.
|
C |
hasColumnName(String columnName)
Verifies that the name of a column is equal to the parameter.
|
C |
hasNumberOfRows(int expected)
Verifies that the number of rows is equal to the number in parameter.
|
C |
hasNumberOfRowsGreaterThan(int expected)
Verifies that the number of rows is greater than the number in parameter.
|
C |
hasNumberOfRowsGreaterThanOrEqualTo(int expected)
Verifies that the number of rows is greater than or equal to the number in parameter.
|
C |
hasNumberOfRowsLessThan(int expected)
Verifies that the number of rows is less than the number in parameter.
|
C |
hasNumberOfRowsLessThanOrEqualTo(int expected)
Verifies that the number of rows is less than or equal to the number in parameter.
|
C |
hasOnlyNotNullValues()
Verifies that all the values of the column are not
null . |
C |
hasOnlyNullValues()
Verifies that all the values of the column are
null . |
C |
hasValues(Boolean... expected)
Verifies that the values of a column are equal to booleans.
|
C |
hasValues(byte[]... expected)
Verifies that the values of a column are equal to bytes.
|
C |
hasValues(Character... expected)
Verifies that the values of a column are equal to characters.
|
C |
hasValues(DateTimeValue... expected)
Verifies that the values of a column are equal to date/time values.
|
C |
hasValues(DateValue... expected)
Verifies that the values of a column are equal to date values.
|
C |
hasValues(Number... expected)
Verifies that the values of a column are equal to numbers.
|
C |
hasValues(Object... expected)
Verifies that the values of a column are equal to objects.
|
C |
hasValues(String... expected)
Verifies that the values of a column are equal to texts.
|
C |
hasValues(TimeValue... expected)
Verifies that the values of a column are equal to time values.
|
C |
hasValues(UUID... expected)
Verifies that the values of a column are equal to UUIDs.
|
C |
isBoolean(boolean lenient)
Verifies that the type of the values of the column is boolean.
|
C |
isBytes(boolean lenient)
Verifies that the type of the values of the column is array of bytes.
|
C |
isDate(boolean lenient)
Verifies that the type of the values of the column is date.
|
C |
isDateTime(boolean lenient)
Verifies that the type of the values of the column is date/time.
|
C |
isEmpty()
Verifies that the number of rows is zero.
|
C |
isNumber(boolean lenient)
Verifies that the type of the values of the column is number.
|
C |
isOfAnyTypeIn(ValueType... expected)
Verifies that the type of the column is equal to one of the types in parameters.
|
C |
isOfClass(Class<?> expected,
boolean lenient)
Verifies that the class of the values of the column is equal to the class in parameter.
|
C |
isOfType(ValueType expected,
boolean lenient)
Verifies that the type of the values of the column is equal to the type in parameter.
|
C |
isText(boolean lenient)
Verifies that the type of the values of the column is text.
|
C |
isTime(boolean lenient)
Verifies that the type of the values of the column is time.
|
C |
isUUID(boolean lenient)
Verifies that the type of the values of the column is UUID.
|
value, value
column, column, column, row, row
returnToOrigin
as, as, describedAs, describedAs, getInfo
protected final Position<C extends AbstractColumnAssert<D,A,C,CV,R,RV>,CV extends AbstractColumnValueAssert<D,A,C,CV,R,RV>,Value> valuePosition
protected final Column column
protected String getValueDescription(int index)
getValueDescription
in class AbstractSubAssert<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>,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<C,CV,Value> getValuePosition()
getValuePosition
in class AbstractSubAssert<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>,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>,C extends AbstractColumnAssert<D,A,C,CV,R,RV>,CV extends AbstractColumnValueAssert<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 C isEmpty()
Example where the assertion verifies that the table is empty :
assertThat(table).isEmpty();
isEmpty
in interface AssertOnNumberOfRows<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
this
assertion object.AbstractDbAssert.isEmpty()
,
isEmpty()
public C hasNumberOfRows(int expected)
Example where the assertion verifies that the table has 2 rows :
assertThat(table).hasNumberOfRows(2);
Example where the assertion verifies that the column with index 1 of the table has 5 rows :
assertThat(table).column(1).hasNumberOfRows(5);
hasNumberOfRows
in interface AssertOnNumberOfRows<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The number to compare to the number of rows.this
assertion object.AbstractDbAssert.hasNumberOfRows(int)
,
hasNumberOfRows(int)
public C hasNumberOfRowsGreaterThan(int expected)
Example where the assertion verifies that the table has more than 8 rows :
assertThat(table).hasNumberOfRowsGreaterThan(8);
Example where the assertion verifies that the first row of the table has more than 8 rows :
assertThat(table).row().hasNumberOfRowsGreaterThan(8);
Example where the assertion verifies that the row at end point of the first change has more than 8 rows :
assertThat(changes).change().rowAtEndPoint().hasNumberOfRowsGreaterThan(8);
hasNumberOfRowsGreaterThan
in interface AssertOnNumberOfRows<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The number to compare to the number of rows.this
assertion object.AbstractDbAssert.hasNumberOfRowsGreaterThan(int)
,
hasNumberOfRowsGreaterThan(int)
public C hasNumberOfRowsLessThan(int expected)
Example where the assertion verifies that the table has less than 8 rows :
assertThat(table).hasNumberOfRowsLessThan(8);
Example where the assertion verifies that the first row of the table has less than 8 rows :
assertThat(table).row().hasNumberOfRowsLessThan(8);
Example where the assertion verifies that the row at end point of the first change has less than 8 rows :
assertThat(changes).change().rowAtEndPoint().hasNumberOfRowsLessThan(8);
hasNumberOfRowsLessThan
in interface AssertOnNumberOfRows<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The number to compare to the number of rows.this
assertion object.AbstractDbAssert.hasNumberOfRowsLessThan(int)
,
hasNumberOfRowsLessThan(int)
public C hasNumberOfRowsGreaterThanOrEqualTo(int expected)
Example where the assertion verifies that the table has at least 8 rows :
assertThat(table).hasNumberOfRowsGreaterThanOrEqualTo(8);
Example where the assertion verifies that the first row of the table has at least 8 rows :
assertThat(table).row().hasNumberOfRowsGreaterThanOrEqualTo(8);
Example where the assertion verifies that the row at end point of the first change has at least 8 rows :
assertThat(changes).change().rowAtEndPoint().hasNumberOfRowsGreaterThanOrEqualTo(8);
hasNumberOfRowsGreaterThanOrEqualTo
in interface AssertOnNumberOfRows<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The number to compare to the number of rows.this
assertion object.AbstractDbAssert.hasNumberOfRowsGreaterThanOrEqualTo(int)
,
hasNumberOfRowsGreaterThanOrEqualTo(int)
public C hasNumberOfRowsLessThanOrEqualTo(int expected)
Example where the assertion verifies that the table has at most 8 rows :
assertThat(table).hasNumberOfRowsLessThanOrEqualTo(8);
Example where the assertion verifies that the first row of the table has at most 8 rows :
assertThat(table).row().hasNumberOfRowsLessThanOrEqualTo(8);
Example where the assertion verifies that the row at end point of the first change has at most 8 rows :
assertThat(changes).change().rowAtEndPoint().hasNumberOfRowsLessThanOrEqualTo(8);
hasNumberOfRowsLessThanOrEqualTo
in interface AssertOnNumberOfRows<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The number to compare to the number of rows.this
assertion object.AbstractDbAssert.hasNumberOfRowsLessThanOrEqualTo(int)
,
hasNumberOfRowsLessThanOrEqualTo(int)
public C isOfClass(Class<?> expected, boolean lenient)
Example where the assertion verifies that all the values in the Column
called "title" of the Table
is of class String
:
assertThat(table).column("title").isOfClass(String.class, false);
Example where the assertion verifies that all the values in the Column
called "title" of the Table
is of class String
or not identified (for example null
) :
assertThat(table).column("title").isOfClass(String.class, true);
isOfClass
in interface AssertOnColumnClass<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected class to compare to.lenient
- true
if the test is lenient : if the class of a value is not identified (for example when the
value is null
), it consider that it is ok.this
assertion object.isOfClass(Class, boolean)
,
ChangeColumnAssert.isOfClass(Class, boolean)
public C isOfType(ValueType expected, boolean lenient)
Example where the assertion verifies that all the values in the Column
called "title" of the Table
is of type TEXT
:
assertThat(table).column("title").isOfType(ValueType.TEXT, false);
Example where the assertion verifies that all the values in the Column
called "title" of the Table
is of type TEXT
or not identified (for example null
) :
assertThat(table).column("title").isOfType(ValueType.TEXT, true);
isOfType
in interface AssertOnColumnType<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected type to compare to.lenient
- true
if the test is lenient : if the type of a value is not identified (for example when the
value is null
), it consider that it is ok.this
assertion object.isOfType(org.assertj.db.type.ValueType, boolean)
,
ChangeColumnAssert.isOfType(org.assertj.db.type.ValueType, boolean)
public C isOfAnyTypeIn(ValueType... expected)
Example where the assertion verifies that the values in the Column
called "title" of the Table
is
of type TEXT
or of type NUMBER
:
assertThat(table).column("title").isOfAnyTypeIn(ValueType.TEXT, ValueType.NUMBER);
isOfAnyTypeIn
in interface AssertOnColumnType<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected types to compare to.this
assertion object.isOfAnyTypeIn(org.assertj.db.type.ValueType...)
,
ChangeColumnAssert.isOfAnyTypeIn(org.assertj.db.type.ValueType...)
public C isNumber(boolean lenient)
Example where the assertion verifies that all the values in the Column
called "year"
of the Table
is a number :
assertThat(table).column("year").isNumber(true);
This assertion method is equivalent to :
xxxxx.isOfType(ValueType.NUMBER, lenient);
isNumber
in interface AssertOnColumnType<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
lenient
- true
if the test is lenient : if the type of a value is not identified (for example when the
value is null
), it consider that it is ok.this
assertion object.ValueType.NUMBER
,
isNumber(boolean)
,
ChangeColumnAssert.isNumber(boolean)
public C isBoolean(boolean lenient)
Example where the assertion verifies that all the values in the first Column
of
the Table
is a boolean :
assertThat(table).column().isBoolean(false);
This assertion method is equivalent to :
xxxxx.isOfType(ValueType.BOOLEAN, lenient);
isBoolean
in interface AssertOnColumnType<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
lenient
- true
if the test is lenient : if the type of a value is not identified (for example when the
value is null
), it consider that it is ok.this
assertion object.ValueType.BOOLEAN
,
isBoolean(boolean)
,
ChangeColumnAssert.isBoolean(boolean)
public C isDate(boolean lenient)
Example where the assertion verifies that all the values in the Column
called "birth"
of the Table
is a date :
assertThat(table).column("birth").isDate(false);
This assertion method is equivalent to :
xxxxx.isOfType(ValueType.DATE, lenient);
isDate
in interface AssertOnColumnType<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
lenient
- true
if the test is lenient : if the type of a value is not identified (for example when the
value is null
), it consider that it is ok.this
assertion object.ValueType.DATE
,
isDate(boolean)
,
ChangeColumnAssert.isDate(boolean)
public C isTime(boolean lenient)
Example where the assertion verifies that all the values in the first Column
of
the Table
is a time :
assertThat(table).column().isTime(false);
This assertion method is equivalent to :
xxxxx.isOfType(ValueType.TIME, lenient);
isTime
in interface AssertOnColumnType<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
lenient
- true
if the test is lenient : if the type of a value is not identified (for example when the
value is null
), it consider that it is ok.this
assertion object.ValueType.TIME
,
isTime(boolean)
,
ChangeColumnAssert.isTime(boolean)
public C isDateTime(boolean lenient)
Example where the assertion verifies that all the values in the first Column
of
the Table
is a date/time :
assertThat(table).column().isDateTime(false);
This assertion method is equivalent to :
xxxxx.isOfType(ValueType.DATE_TIME, lenient);
isDateTime
in interface AssertOnColumnType<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
lenient
- true
if the test is lenient : if the type of a value is not identified (for example when the
value is null
), it consider that it is ok.this
assertion object.ValueType.DATE_TIME
,
isDateTime(boolean)
,
ChangeColumnAssert.isDateTime(boolean)
public C isBytes(boolean lenient)
Example where the assertion verifies that all the values in the first Column
of
the Table
is a array of bytes :
assertThat(table).column().isBytes(false);
This assertion method is equivalent to :
xxxxx.isOfType(ValueType.BYTES, lenient);
isBytes
in interface AssertOnColumnType<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
lenient
- true
if the test is lenient : if the type of a value is not identified (for example when the
value is null
), it consider that it is ok.this
assertion object.ValueType.BYTES
,
isBytes(boolean)
,
ChangeColumnAssert.isBytes(boolean)
public C isText(boolean lenient)
Example where the assertion verifies that all the values in the Column
called "title"
of the Table
is a text :
assertThat(table).column("title").isText(false);
This assertion method is equivalent to :
xxxxx.isOfType(ValueType.TEXT, lenient);
isText
in interface AssertOnColumnType<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
lenient
- true
if the test is lenient : if the type of a value is not identified (for example when the
value is null
), it consider that it is ok.this
assertion object.ValueType.TEXT
,
isText(boolean)
,
ChangeColumnAssert.isText(boolean)
public C isUUID(boolean lenient)
Example where the assertion verifies that all the values in the Column
called "id"
of the Table
is UUID :
assertThat(table).column("id").isUUID(false);
This assertion method is equivalent to :
xxxxx.isOfType(ValueType.UUID, lenient);
isUUID
in interface AssertOnColumnType<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
lenient
- true
if the test is lenient : if the type of a value is not identified (for example when the
value is null
), it consider that it is ok.this
assertion object.ValueType.UUID
,
isUUID(boolean)
,
ChangeColumnAssert.isUUID(boolean)
public C hasOnlyNullValues()
null
.
Example where the assertion verifies that all the values in the first Column
of the Table
are
null
:
assertThat(table).column().hasOnlyNullValues();
hasOnlyNullValues
in interface AssertOnColumnNullity<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
this
assertion object.hasOnlyNullValues()
public C hasOnlyNotNullValues()
null
.
Example where the assertion verifies that all the values in the first Column
of the Table
are not
null
:
assertThat(table).column().hasOnlyNotNullValues();
hasOnlyNotNullValues
in interface AssertOnColumnNullity<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
this
assertion object.hasOnlyNotNullValues()
public C hasValues(Object... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are equal to
the objects in parameter :
assertThat(table).column().hasValues(Locale.FRENCH, Locale.ENGLISH, Locale.FRENCH);
hasValues
in interface AssertOnColumnEquality<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected object values.this
assertion object.hasValues(Object...)
public C hasValues(Boolean... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are equal to
the booleans in parameter :
assertThat(table).column().hasValues(true, false, true);
hasValues
in interface AssertOnColumnEquality<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected boolean values.this
assertion object.hasValues(Boolean...)
public C hasValues(Number... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are equal to
the numbers in parameter :
assertThat(table).column().hasValues(5, 10.5, 6);
hasValues
in interface AssertOnColumnEquality<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected numbers values.this
assertion object.hasValues(Number...)
public C hasValues(byte[]... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are equal to
arrays of bytes loaded from files in the classpath :
byte[] bytes1 = bytesContentFromClassPathOf("file1.png");
byte[] bytes2 = bytesContentFromClassPathOf("file2.png");
assertThat(table).column().hasValues(bytes1, bytes2);
hasValues
in interface AssertOnColumnEquality<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected bytes values.this
assertion object.org.assertj.db.api.AbstractColumnAssert#hasValues(byte[]...)
public C hasValues(String... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are equal to
the texts in parameter :
assertThat(table).column().hasValues("text", "text2", "text3");
hasValues
in interface AssertOnColumnEquality<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected text values.this
assertion object.hasValues(String...)
public C hasValues(Character... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are equal to
the characters in parameter :
assertThat(table).column().hasValues('t', 'e', 'x', 't');
hasValues
in interface AssertOnColumnEquality<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected character values.this
assertion object.hasValues(Character...)
public C hasValues(UUID... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are equal to
the UUIDs in parameter :
assertThat(table).column().hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"),
UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6"), UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA"));
hasValues
in interface AssertOnColumnEquality<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected UUID values.this
assertion object.hasValues(UUID...)
public C hasValues(DateValue... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are equal to
the date values in parameter :
assertThat(table).column().hasValues(DateValue.of(2014, 7, 7), DateValue.of(2014, 10, 3),
DateValue.of(2014, 12, 23));
hasValues
in interface AssertOnColumnEquality<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected date values.this
assertion object.hasValues(DateValue...)
public C hasValues(TimeValue... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are equal to
the time values in parameter :
assertThat(table).column().hasValues(TimeValue.of(21, 29, 30), TimeValue.of(10, 1, 25), TimeValue.of(9, 1));
hasValues
in interface AssertOnColumnEquality<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected time values.this
assertion object.hasValues(TimeValue...)
public C hasValues(DateTimeValue... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are equal to
the date/time values in parameter :
assertThat(table).column().hasValues(DateTimeValue.of(DateValue.of(2014, 7, 7), TimeValue.of(21, 29)),
DateTimeValue.of(DateValue.of(2014, 7, 7), TimeValue.of(10, 1, 25)),
DateTimeValue.of(DateValue.of(2014, 7, 7), TimeValue.of(9, 1)));
hasValues
in interface AssertOnColumnEquality<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected date/time values.this
assertion object.hasValues(DateTimeValue...)
public C containsValues(Object... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are containing
the objects in parameter :
assertThat(table).column().containsValues(Locale.FRENCH, Locale.ENGLISH, Locale.FRENCH);
containsValues
in interface AssertOnColumnContent<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected object values.this
assertion object.containsValues(Object...)
public C containsValues(Boolean... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are containing
the booleans in parameter :
assertThat(table).column().containsValues(true, false, true);
containsValues
in interface AssertOnColumnContent<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected boolean values.this
assertion object.containsValues(Boolean...)
public C containsValues(Number... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are containing
the numbers in parameter :
assertThat(table).column().containsValues(5, 10.5, 6);
containsValues
in interface AssertOnColumnContent<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected numbers values.this
assertion object.containsValues(Number...)
public C containsValues(byte[]... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are containing
arrays of bytes loaded from files in the classpath :
byte[] bytes1 = bytesContentFromClassPathOf("file1.png");
byte[] bytes2 = bytesContentFromClassPathOf("file2.png");
assertThat(table).column().containsValues(bytes1, bytes2);
containsValues
in interface AssertOnColumnContent<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected bytes values.this
assertion object.org.assertj.db.api.AbstractColumnAssert#containsValues(byte[]...)
public C containsValues(String... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are containing
the texts in parameter :
assertThat(table).column().containsValues("text", "text2", "text3");
containsValues
in interface AssertOnColumnContent<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected text values.this
assertion object.containsValues(String...)
public C containsValues(Character... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are containing
the characters in parameter :
assertThat(table).column().containsValues('t', 'e', 'x', 't');
containsValues
in interface AssertOnColumnContent<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected character values.this
assertion object.containsValues(Character...)
public C containsValues(UUID... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are containing
the UUIDs in parameter :
assertThat(table).column().containsValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"),
UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6"), UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA"));
containsValues
in interface AssertOnColumnContent<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected UUID values.this
assertion object.containsValues(java.util.UUID...)
public C containsValues(DateValue... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are containing
the date values in parameter :
assertThat(table).column().containsValues(DateValue.of(2014, 7, 7), DateValue.of(2014, 10, 3),
DateValue.of(2014, 12, 23));
containsValues
in interface AssertOnColumnContent<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected date values.this
assertion object.containsValues(org.assertj.db.type.DateValue...)
public C containsValues(TimeValue... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are containing
the time values in parameter :
assertThat(table).column().containsValues(TimeValue.of(21, 29, 30), TimeValue.of(10, 1, 25), TimeValue.of(9, 1));
containsValues
in interface AssertOnColumnContent<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected time values.this
assertion object.containsValues(org.assertj.db.type.TimeValue...)
public C containsValues(DateTimeValue... expected)
Example where the assertion verifies that the values in the first Column
of the Table
are containing
the date/time values in parameter :
assertThat(table).column().containsValues(DateTimeValue.of(DateValue.of(2014, 7, 7), TimeValue.of(21, 29)),
DateTimeValue.of(DateValue.of(2014, 7, 7), TimeValue.of(10, 1, 25)),
DateTimeValue.of(DateValue.of(2014, 7, 7), TimeValue.of(9, 1)));
containsValues
in interface AssertOnColumnContent<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
expected
- The expected date/time values.this
assertion object.containsValues(org.assertj.db.type.DateTimeValue...)
public C hasColumnName(String columnName)
Example where the assertion verifies that the column name of the first Column
of the Table
is equal to
"title" :
assertThat(table).column().hasColumnName("title");
Example where the assertion verifies that the first value of the first Row
of the Table
is equal to
"title" :
assertThat(table).row().value().hasColumnName("title");
Example where the assertion verifies that the column name of the first Column
of the Table
is equal to
"title" :
assertThat(changes).change(1).column().hasColumnName("title");
Example where the assertion verifies that the first value of the first Row
of the Table
is equal to
"title" :
assertThat(changes).change(1).row().value().hasColumnName("title");
hasColumnName
in interface AssertOnColumnName<C extends AbstractColumnAssert<D,A,C,CV,R,RV>>
columnName
- The expected column name.this
assertion object.hasColumnName(String)
,
AbstractRowValueAssert.hasColumnName(String)
,
ChangeColumnAssert.hasColumnName(String)
,
ChangeRowValueAssert.hasColumnName(String)
Copyright © 2020 AssertJ. All rights reserved.