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 AssertOnValueClass<T extends AssertOnValueClass<T>>
Modifier and Type | Method and Description |
---|---|
T |
isOfClass(Class<?> expected)
Verifies that the class of the value is equal to the class in parameter.
|
T isOfClass(Class<?> expected)
Example where the assertion verifies that the value in the Column
called "title" of the second Row
of the Table
is of class String
:
assertThat(table).row(1).value("title").isOfClass(String.class);
Example where the assertion verifies that the value in the Column
called "title" of the Row
at end point
of the first Change
is of class String
:
assertThat(changes).change().rowAtEndPoint().value("title").isOfClass(String.class);
expected
- The expected class to compare to.this
assertion object.AssertionError
- If the class of the value is different to the class in parameter.AbstractValueAssert.isOfClass(Class)
,
AbstractAssertWithValues.isOfClass(Class)
Copyright © 2020 AssertJ. All rights reserved.