Interface AssertOnChangeType<T extends AssertOnChangeType<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 AssertOnChangeType<T extends AssertOnChangeType<T>>
Defines the assertion methods on the type of a change (creation, modification or deletion of a row).

The different type of changes are enumerated in ChangeType.

Author:
Régis Pouiller
  • Method Summary

    Modifier and Type
    Method
    Description
    Verifies that the type of the change is a creation.
    Verifies that the type of the change is a deletion.
    Verifies that the type of the change is a modification.
    isOfType(ChangeType expected)
    Verifies that the type of the change is equal to the type in parameter.
  • Method Details

    • isOfType

      T isOfType(ChangeType expected)
      Verifies that the type of the change is equal to the type in parameter.

      Example where the assertion verifies that the change is of type CREATION :

       
       assertThat(changes).change(1).isOfType(ChangeType.CREATION);
       
       
      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:
    • isCreation

      T isCreation()
      Verifies that the type of the change is a creation.

      Example where the assertion verifies that the change is a creation :

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

      This assertion method is equivalent to :

       
       xxxxx.isOfType(ChangeType.CREATION);
       
       
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the type of the change is not a creation.
      See Also:
    • isModification

      T isModification()
      Verifies that the type of the change is a modification.

      Example where the assertion verifies that the change is a modification :

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

      This assertion method is equivalent to :

       
       xxxxx.isOfType(ChangeType.MODIFICATION);
       
       
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the type of the change is not a modification.
      See Also:
    • isDeletion

      T isDeletion()
      Verifies that the type of the change is a deletion.

      Example where the assertion verifies that the change is a deletion :

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

      This assertion method is equivalent to :

       
       xxxxx.isOfType(ChangeType.DELETION);
       
       
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the type of the change is not a deletion.
      See Also: