T
- The "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation"
for more details.public interface AssertOnColumnClass<T extends AssertOnColumnClass<T>>
Modifier and Type | Method and Description |
---|---|
T |
isOfClass(Class<?> expected,
boolean lenient)
Verifies that the class of the values of the column is equal to the class in parameter.
|
T 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);
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.AssertionError
- If the class of the column is different to the class in parameter.AbstractColumnAssert.isOfClass(Class, boolean)
,
ChangeColumnAssert.isOfClass(Class, boolean)
Copyright © 2015–2019 AssertJ. All rights reserved.