Class AssertionsOnPrimaryKey

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

public class AssertionsOnPrimaryKey extends Object
Implements the assertion methods on a primary key.
Author:
Régis Pouiller
See Also:
  • Method Details

    • hasPksNames

      public static <A extends AbstractAssert<?>> A hasPksNames(A assertion, org.assertj.core.api.WritableAssertionInfo info, Change change, LetterCase primaryKeyLetterCase, String... names)
      Verifies that the columns og the primary key of the rows of the change is the same as the parameters.
      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.
      primaryKeyLetterCase - Letter case of the primary keys.
      names - The names of the primary key associated with the rows of the change.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the columns of the primary key are different to the names in parameters.
      NullPointerException - If one of the names in parameters is null.
    • hasPksValues

      public static <A extends AbstractAssert<?>> A hasPksValues(A assertion, org.assertj.core.api.WritableAssertionInfo info, Change change, Object... values)
      Verifies that the values of the primary key of the rows of the change are the same as the parameters.
      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.
      values - The values of the primary key associated with the rows of the change.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the values of the primary key are different to the values in parameters.