Package org.assertj.db.api.assertions
Interface AssertOnColumnClass<T extends AssertOnColumnClass<T>>
- Type Parameters:
T- The "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" for more details.
- All Known Implementing Classes:
AbstractColumnAssert,ChangeColumnAssert,RequestColumnAssert,TableColumnAssert
public interface AssertOnColumnClass<T extends AssertOnColumnClass<T>>
Defines the assertion method on the class of a column.
- Since:
- 1.1.0
- Author:
- Régis Pouiller
-
Method Summary
-
Method Details
-
isOfClass
Verifies that the class of the values of the column is equal to the class in parameter.Example where the assertion verifies that all the values in the
Columncalled "title" of theTableis of classString:assertThat(table).column("title").isOfClass(String.class, false);Example where the assertion verifies that all the values in the
Columncalled "title" of theTableis of classStringor not identified (for examplenull) :assertThat(table).column("title").isOfClass(String.class, true);- Parameters:
expected- The expected class to compare to.lenient-trueif the test is lenient : if the class of a value is not identified (for example when the value isnull), it consider that it is ok.- Returns:
thisassertion object.- Throws:
AssertionError- If the class of the column is different to the class in parameter.- Since:
- 1.1.0
- See Also:
-