Interface AssertOnValueClass<T extends AssertOnValueClass<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:
AbstractAssertWithValues, AbstractColumnValueAssert, AbstractRowValueAssert, AbstractValueAssert, ChangeColumnValueAssert, ChangeRowValueAssert, RequestColumnValueAssert, RequestRowValueAssert, TableColumnValueAssert, TableRowValueAssert

public interface AssertOnValueClass<T extends AssertOnValueClass<T>>
Defines the assertion method on the class of a value.
Since:
1.1.0
Author:
Régis Pouiller
  • Method Summary

    Modifier and Type
    Method
    Description
    isOfClass(Class<?> expected)
    Verifies that the class of the value is equal to the class in parameter.
  • Method Details

    • isOfClass

      T isOfClass(Class<?> expected)
      Verifies that the class of the value is equal to the class in parameter.

      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);
       
       
      Parameters:
      expected - The expected class to compare to.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the class of the value is different to the class in parameter.
      Since:
      1.1.0
      See Also: