public class ChangeColumnAssert extends AbstractAssertWithOriginWithColumnsAndRowsFromChange<ChangeColumnAssert,ChangeAssert> implements ColumnAssert, OriginWithValuesFromColumn, AssertOnColumnOfChangeEquality<ChangeColumnAssert>, AssertOnModifiedColumn<ChangeColumnAssert>, AssertOnColumnName<ChangeColumnAssert>, AssertOnColumnType<ChangeColumnAssert>
Column
of a Change
.origin
info, myself
Modifier and Type | Method and Description |
---|---|
ChangeColumnAssert |
hasColumnName(String columnName)
Verifies that the name of a column is equal to the parameter.
|
ChangeColumnAssert |
hasValues(Boolean expected)
Verifies that the values at the start point and the end point are equal to a boolean.
|
ChangeColumnAssert |
hasValues(Boolean expectedAtStartPoint,
Boolean expectedAtEndPoint)
Verifies that the values at the start point and the end point are equal to a boolean for start point and another boolean for end point.
|
ChangeColumnAssert |
hasValues(byte[] expected)
Verifies that the values at the start point and the end point are equal to bytes.
|
ChangeColumnAssert |
hasValues(byte[] expectedAtStartPoint,
byte[] expectedAtEndPoint)
Verifies that the values at the start point and the end point are equal to bytes for start point and other bytes for end point.
|
ChangeColumnAssert |
hasValues(DateTimeValue expected)
Verifies that the values at the start point and the end point are equal to a date/time.
|
ChangeColumnAssert |
hasValues(DateTimeValue expectedAtStartPoint,
DateTimeValue expectedAtEndPoint)
Verifies that the values at the start point and the end point are equal to a date/time for start point and another date/time for end point.
|
ChangeColumnAssert |
hasValues(DateValue expected)
Verifies that the values at the start point and the end point are equal to a date.
|
ChangeColumnAssert |
hasValues(DateValue expectedAtStartPoint,
DateValue expectedAtEndPoint)
Verifies that the values at the start point and the end point are equal to a date for start point and another date for end point.
|
ChangeColumnAssert |
hasValues(Number expected)
Verifies that the values at the start point and the end point are equal to a number.
|
ChangeColumnAssert |
hasValues(Number expectedAtStartPoint,
Number expectedAtEndPoint)
Verifies that the values at the start point and the end point are equal to a number for start point and another number for end point.
|
ChangeColumnAssert |
hasValues(String expected)
Verifies that the values at the start point and the end point are equal to a text.
|
ChangeColumnAssert |
hasValues(String expectedAtStartPoint,
String expectedAtEndPoint)
Verifies that the values at the start point and the end point are equal to a text for start point and another text for end point.
|
ChangeColumnAssert |
hasValues(TimeValue expected)
Verifies that the values at the start point and the end point are equal to a time.
|
ChangeColumnAssert |
hasValues(TimeValue expectedAtStartPoint,
TimeValue expectedAtEndPoint)
Verifies that the values at the start point and the end point are equal to a time for start point and another time for end point.
|
ChangeColumnAssert |
isBoolean(boolean lenient)
Verifies that the type of the values of the column is boolean.
|
ChangeColumnAssert |
isBytes(boolean lenient)
Verifies that the type of the values of the column is array of bytes.
|
ChangeColumnAssert |
isDate(boolean lenient)
Verifies that the type of the values of the column is date.
|
ChangeColumnAssert |
isDateTime(boolean lenient)
Verifies that the type of the values of the column is date/time.
|
ChangeColumnAssert |
isModified()
Verifies that the column is modified between the start point and the end point.
|
ChangeColumnAssert |
isNotModified()
Verifies that the column is not modified between the start point and the end point.
|
ChangeColumnAssert |
isNumber(boolean lenient)
Verifies that the type of the values of the column is number.
|
ChangeColumnAssert |
isOfAnyTypeIn(ValueType... expected)
Verifies that the type of the column is equal to one of the types in parameters.
|
ChangeColumnAssert |
isOfType(ValueType expected,
boolean lenient)
Verifies that the type of the values of the column is equal to the type in parameter.
|
ChangeColumnAssert |
isText(boolean lenient)
Verifies that the type of the values of the column is text.
|
ChangeColumnAssert |
isTime(boolean lenient)
Verifies that the type of the values of the column is time.
|
ChangeAssert |
returnToChange()
Returns to level of assertion methods on a
Change . |
ChangeColumnValueAssert |
valueAtEndPoint()
Returns assertion methods on the value at the end point.
|
ChangeColumnValueAssert |
valueAtStartPoint()
Returns assertion methods on the value at the start point.
|
column, column, column, columnAmongTheModifiedOnes, columnAmongTheModifiedOnes, columnAmongTheModifiedOnes, rowAtEndPoint, rowAtStartPoint
change, change, changeOfCreation, changeOfCreation, changeOfCreationOnTable, changeOfCreationOnTable, changeOfDeletion, changeOfDeletion, changeOfDeletionOnTable, changeOfDeletionOnTable, changeOfModification, changeOfModification, changeOfModificationOnTable, changeOfModificationOnTable, changeOnTable, changeOnTable, changeOnTableWithPks, ofAll, ofCreation, ofCreationOnTable, ofDeletion, ofDeletionOnTable, ofModification, ofModificationOnTable, onTable
returnToOrigin
as, as, describedAs, describedAs
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ofAll, ofCreation, ofCreationOnTable, ofDeletion, ofDeletionOnTable, ofModification, ofModificationOnTable, onTable
change, change, changeOfCreation, changeOfCreation, changeOfCreationOnTable, changeOfCreationOnTable, changeOfDeletion, changeOfDeletion, changeOfDeletionOnTable, changeOfDeletionOnTable, changeOfModification, changeOfModification, changeOfModificationOnTable, changeOfModificationOnTable, changeOnTable, changeOnTable, changeOnTableWithPks
columnAmongTheModifiedOnes, columnAmongTheModifiedOnes, columnAmongTheModifiedOnes
rowAtEndPoint, rowAtStartPoint
public ChangeColumnValueAssert valueAtStartPoint()
valueAtStartPoint
in interface ToValueFromColumn<ChangeColumnValueAssert>
valueAtStartPoint
,
ChangeColumnValueAssert.valueAtStartPoint()
public ChangeColumnValueAssert valueAtEndPoint()
valueAtEndPoint
in interface ToValueFromColumn<ChangeColumnValueAssert>
valueAtEndPoint
,
ChangeColumnValueAssert.valueAtEndPoint()
public ChangeColumnAssert isModified()
Example where the assertion verifies that :
assertThat(changes).change(1).column().isModified();
isModified
in interface AssertOnModifiedColumn<ChangeColumnAssert>
this
assertion object.isModified()
public ChangeColumnAssert isNotModified()
Example where the assertion verifies that :
assertThat(changes).change(1).column().isNotModified();
isNotModified
in interface AssertOnModifiedColumn<ChangeColumnAssert>
this
assertion object.isNotModified()
public ChangeColumnAssert hasValues(Boolean expected)
Example where the assertion verifies that the values of the first Column
of the Table
are equal to
true
:
assertThat(changes).change(1).column().hasValues(true);
hasValues
in interface AssertOnColumnOfChangeEquality<ChangeColumnAssert>
expected
- The expected boolean value.this
assertion object.hasValues(Boolean)
public ChangeColumnAssert hasValues(Boolean expectedAtStartPoint, Boolean expectedAtEndPoint)
Example where the assertion verifies that the values of the first Column
of the Table
are equal to
true
at start point and false
at end point :
assertThat(changes).change(1).column().hasValues(true, false);
hasValues
in interface AssertOnColumnOfChangeEquality<ChangeColumnAssert>
expectedAtStartPoint
- The expected boolean at start point.expectedAtEndPoint
- The expected boolean at end point.this
assertion object.hasValues(Boolean, Boolean)
public ChangeColumnAssert hasValues(Number expected)
Example where the assertion verifies that the values of the first Column
of the Table
are equal to
1
:
assertThat(changes).change(1).column().hasValues(1);
hasValues
in interface AssertOnColumnOfChangeEquality<ChangeColumnAssert>
expected
- The expected number value.this
assertion object.hasValues(Number)
public ChangeColumnAssert hasValues(Number expectedAtStartPoint, Number expectedAtEndPoint)
Example where the assertion verifies that the values of the first Column
of the Table
are equal to
1
at start point and 2
at end point :
assertThat(changes).change(1).column().hasValues(1, 2);
hasValues
in interface AssertOnColumnOfChangeEquality<ChangeColumnAssert>
expectedAtStartPoint
- The expected number at start point.expectedAtEndPoint
- The expected number at end point.this
assertion object.hasValues(Number, Number)
public ChangeColumnAssert hasValues(byte[] expected)
Example where the assertion verifies that the values of the first Column
of the Table
are equal to
a array of bytes loaded from a file in the classpath :
byte[] bytes = bytesContentFromClassPathOf("file.png");
assertThat(changes).change(1).column().hasValues(bytes);
hasValues
in interface AssertOnColumnOfChangeEquality<ChangeColumnAssert>
expected
- The expected bytes value.this
assertion object.hasValues(byte[])
public ChangeColumnAssert hasValues(byte[] expectedAtStartPoint, byte[] expectedAtEndPoint)
Example where the assertion verifies that the values of the first Column
of the Table
are equal to
a array of bytes loaded from a file in the classpath at start point and another array at end point :
byte[] bytes = bytesContentFromClassPathOf("file.png");
byte[] bytes2 = bytesContentFromClassPathOf("file2.png");
assertThat(changes).change(1).column().hasValues(bytes, bytes2);
hasValues
in interface AssertOnColumnOfChangeEquality<ChangeColumnAssert>
expectedAtStartPoint
- The expected bytes at start point.expectedAtEndPoint
- The expected bytes at end point.this
assertion object.hasValues(byte[], byte[])
public ChangeColumnAssert hasValues(String expected)
Example where the assertion verifies that the values of the first Column
of the Table
are equal to
"Ellen Louise Ripley" :
assertThat(changes).change(1).column().hasValues("Ellen Louise Ripley");
hasValues
in interface AssertOnColumnOfChangeEquality<ChangeColumnAssert>
expected
- The expected text value.this
assertion object.hasValues(String)
public ChangeColumnAssert hasValues(String expectedAtStartPoint, String expectedAtEndPoint)
Example where the assertion verifies that the values of the first Column
of the Table
are equal to
"Sigourney" at start point and "Susan Alexandra" at end point :
assertThat(changes).change(1).column().hasValues("Sigourney", "Susan Alexandra");
hasValues
in interface AssertOnColumnOfChangeEquality<ChangeColumnAssert>
expectedAtStartPoint
- The expected text at start point.expectedAtEndPoint
- The expected text at end point.this
assertion object.hasValues(String, String)
public ChangeColumnAssert hasValues(DateValue expected)
Example where the assertion verifies that the values of the first Column
of the Table
are equal to
12/23/2007 :
assertThat(changes).change(1).column().hasValues(DateValue.of(2007, 12, 23));
hasValues
in interface AssertOnColumnOfChangeEquality<ChangeColumnAssert>
expected
- The expected date value.this
assertion object.hasValues(DateValue)
public ChangeColumnAssert hasValues(DateValue expectedAtStartPoint, DateValue expectedAtEndPoint)
Example where the assertion verifies that the values of the first Column
of the Table
are equal to
12/23/2007 at start point and 07/25/2002 at end point :
assertThat(changes).change(1).column().hasValues(DateValue.of(2007, 12, 23), DateValue.of(2002, 7, 25));
hasValues
in interface AssertOnColumnOfChangeEquality<ChangeColumnAssert>
expectedAtStartPoint
- The expected date at start point.expectedAtEndPoint
- The expected date at end point.this
assertion object.hasValues(DateValue, DateValue)
public ChangeColumnAssert hasValues(TimeValue expected)
Example where the assertion verifies that the values of the first Column
of the Table
are equal to
09:01AM :
assertThat(changes).change(1).column().hasValues(TimeValue.of(9, 1));
hasValues
in interface AssertOnColumnOfChangeEquality<ChangeColumnAssert>
expected
- The expected time value.this
assertion object.hasValues(TimeValue)
public ChangeColumnAssert hasValues(TimeValue expectedAtStartPoint, TimeValue expectedAtEndPoint)
Example where the assertion verifies that the values of the first Column
of the Table
are equal to
09:01AM at start point and 03:30AM at end point :
assertThat(changes).change(1).column().hasValues(TimeValue.of(9, 1), TimeValue.of(3, 30));
hasValues
in interface AssertOnColumnOfChangeEquality<ChangeColumnAssert>
expectedAtStartPoint
- The expected time at start point.expectedAtEndPoint
- The expected time at end point.this
assertion object.hasValues(TimeValue, TimeValue)
public ChangeColumnAssert hasValues(DateTimeValue expected)
Example where the assertion verifies that the values of the first Column
of the Table
are equal to
12/23/2007 09:01AM :
assertThat(changes).change(1).column().hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)));
hasValues
in interface AssertOnColumnOfChangeEquality<ChangeColumnAssert>
expected
- The expected date/time value.this
assertion object.hasValues(DateTimeValue)
public ChangeColumnAssert hasValues(DateTimeValue expectedAtStartPoint, DateTimeValue expectedAtEndPoint)
Example where the assertion verifies that the values of the first Column
of the Table
are equal to
12/23/2007 09:01AM at start point and 07/25/2002 00:00AM at end point :
assertThat(changes).change(1).column().hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), DateTimeValue.of(DateValue.of(2002, 7, 25)));
hasValues
in interface AssertOnColumnOfChangeEquality<ChangeColumnAssert>
expectedAtStartPoint
- The expected date/time at start point.expectedAtEndPoint
- The expected date/time at end point.this
assertion object.hasValues(DateTimeValue, DateTimeValue)
public ChangeColumnAssert 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<ChangeColumnAssert>
columnName
- The expected column name.this
assertion object.AbstractColumnAssert.hasColumnName(String)
,
AbstractRowValueAssert.hasColumnName(String)
,
hasColumnName(String)
,
ChangeRowValueAssert.hasColumnName(String)
public ChangeColumnAssert 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<ChangeColumnAssert>
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.AbstractColumnAssert.isOfType(org.assertj.db.type.ValueType, boolean)
public ChangeColumnAssert 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<ChangeColumnAssert>
expected
- The expected types to compare to.this
assertion object.AbstractColumnAssert.isOfAnyTypeIn(org.assertj.db.type.ValueType...)
public ChangeColumnAssert 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<ChangeColumnAssert>
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
,
AbstractColumnAssert.isNumber(boolean)
public ChangeColumnAssert 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<ChangeColumnAssert>
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
,
AbstractColumnAssert.isBoolean(boolean)
public ChangeColumnAssert 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<ChangeColumnAssert>
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
,
AbstractColumnAssert.isDate(boolean)
public ChangeColumnAssert 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<ChangeColumnAssert>
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
,
AbstractColumnAssert.isTime(boolean)
public ChangeColumnAssert 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<ChangeColumnAssert>
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
,
AbstractColumnAssert.isDateTime(boolean)
public ChangeColumnAssert 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<ChangeColumnAssert>
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
,
AbstractColumnAssert.isBytes(boolean)
public ChangeColumnAssert 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<ChangeColumnAssert>
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
,
AbstractColumnAssert.isText(boolean)
public ChangeAssert returnToChange()
Change
.Change
.Copyright © 2015 AssertJ. All Rights Reserved.