Class AssertionsOnChangeType

java.lang.Object
org.assertj.db.api.assertions.impl.AssertionsOnChangeType

public class AssertionsOnChangeType extends Object
Implements 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
See Also:
  • Method Details

    • isOfType

      public static <A extends AbstractAssert<?>> A isOfType(A assertion, org.assertj.core.api.WritableAssertionInfo info, Change change, ChangeType expected)
      Verifies that the type of the change is equal to the type in parameter.
      Type Parameters:
      A - The type of the assertion which call this method.
      Parameters:
      assertion - The assertion which call this method.
      info - Writable information about an assertion.
      change - The change.
      expected - The expected type to compare to.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the type is different to the type in parameter.
    • isCreation

      public static <A extends AbstractAssert<?>> A isCreation(A assertion, org.assertj.core.api.WritableAssertionInfo info, Change change)
      Verifies that the type of the change is a creation.
      Type Parameters:
      A - The type of the assertion which call this method.
      Parameters:
      assertion - The assertion which call this method.
      info - Writable information about an assertion.
      change - The change.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the type of the change is not a creation.
    • isModification

      public static <A extends AbstractAssert<?>> A isModification(A assertion, org.assertj.core.api.WritableAssertionInfo info, Change change)
      Verifies that the type of the change is a modification.
      Type Parameters:
      A - The type of the assertion which call this method.
      Parameters:
      assertion - The assertion which call this method.
      info - Writable information about an assertion.
      change - The change.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the type of the change is not a modification.
    • isDeletion

      public static <A extends AbstractAssert<?>> A isDeletion(A assertion, org.assertj.core.api.WritableAssertionInfo info, Change change)
      Verifies that the type of the change is a deletion.
      Type Parameters:
      A - The type of the assertion which call this method.
      Parameters:
      assertion - The assertion which call this method.
      info - Writable information about an assertion.
      change - The change.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the type of the change is not a deletion.