Interface AssertOnDataType<T extends AssertOnDataType<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:
ChangeAssert

public interface AssertOnDataType<T extends AssertOnDataType<T>>
Defines the assertion methods on the type of data (from a table or from a request).

The different type of data are enumerated in DataType.

Author:
Régis Pouiller
  • Method Summary

    Modifier and Type
    Method
    Description
    Verifies that the data type on which is the change is equal to the type in parameter.
    Verifies that the data type on which is the change is a request.
    Verifies that the data type on which is the change is a table.
    Verifies that the change is on a table with the name in parameter.
  • Method Details

    • isOnDataType

      T isOnDataType(DataType expected)
      Verifies that the data type on which is the change is equal to the type in parameter.

      Example where the assertion verifies that the change is on data type TABLE :

       
       assertThat(changes).change(1).isOnDataType(DataType.TABLE);
       
       
      Parameters:
      expected - The expected type to compare to.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the type is different to the type in parameter.
      See Also:
    • isOnTable

      T isOnTable()
      Verifies that the data type on which is the change is a table.

      Example where the assertion verifies that the change is on data type TABLE :

       
       assertThat(changes).change(1).isOnTable();
       
       

      This assertion method is equivalent to :

       
       xxxxx.isOnDataType(DataType.TABLE);
       
       
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the type of data is not table.
      See Also:
    • isOnRequest

      T isOnRequest()
      Verifies that the data type on which is the change is a request.

      Example where the assertion verifies that the change is on data type REQUEST :

       
       assertThat(changes).change(1).isOnRequest();
       
       

      This assertion method is equivalent to :

       
       xxxxx.isOnDataType(DataType.REQUEST);
       
       
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the type of data is not request.
      See Also:
    • isOnTable

      T isOnTable(String name)
      Verifies that the change is on a table with the name in parameter.

      Example where the assertion verifies that the change is on TABLE called movie :

       
       assertThat(changes).change(1).isOnTable("movie");
       
       
      Parameters:
      name - The name of the table on which is the change.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the type of data is not table or if the table have a different name.
      NullPointerException - If the name in parameter is null.
      See Also: