Class ValidationAssertions

java.lang.Object
com.github.jinahya.assertj.validation.ValidationAssertions

public final class ValidationAssertions extends Object
A class for creating assertion instances.
Author:
Jin Kwon <onacit_at_gmail.com>
  • Method Summary

    Modifier and Type
    Method
    Description
    static <ACTUAL> BeanAssert<?,ACTUAL>
    assertThatBean(ACTUAL actual)
    Creates a new assertion object for verifying specified bean object.
    static <SELF extends BeanAssert<SELF, ACTUAL>, ACTUAL>
    SELF
    assertThatBean(Class<SELF> selfClass, ACTUAL actual)
    Creates a new assertion object for verifying specified bean object.
    static <SELF extends BeanAssert<SELF, ACTUAL>, ACTUAL>
    SELF
    assertThatBean(Class<SELF> selfClass, Class<ACTUAL> actualType, ACTUAL actual)
    Creates a new assertion object for verifying specified bean object.
    static <ACTUAL> PropertyAssert<?,ACTUAL>
    assertThatProperty(ACTUAL actual)
    Creates a new assertion object for verifying specified value against a property of specific bean type.
    static <SELF extends PropertyAssert<SELF, ACTUAL>, ACTUAL>
    SELF
    assertThatProperty(Class<SELF> selfClass, ACTUAL actual)
    Creates a new assertion object for verifying specified value against a property of specific bean type.
    static <SELF extends PropertyAssert<SELF, ACTUAL>, ACTUAL>
    SELF
    assertThatProperty(Class<SELF> selfClass, Class<ACTUAL> actualClass, ACTUAL actual)
    Creates a new assertion object for verifying specified value against a property of specific bean type.
    static <SELF extends BeanAssert<SELF, ACTUAL>, ACTUAL>
    SELF
    Creates a new assertion object for verifying specified bean object.
    static <SELF extends PropertyAssert<SELF, ACTUAL>, ACTUAL>
    SELF
    Creates a new assertion object for verifying specified value against a property of specific bean type.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • assertThatBean

      public static <ACTUAL> BeanAssert<?,ACTUAL> assertThatBean(ACTUAL actual)
      Creates a new assertion object for verifying specified bean object.
      Type Parameters:
      ACTUAL - type of actual bean
      Parameters:
      actual - the actual bean object to verify.
      Returns:
      a new assertion object for verifying actual.
    • assertThatBean

      public static <SELF extends BeanAssert<SELF, ACTUAL>, ACTUAL> SELF assertThatBean(Class<SELF> selfClass, Class<ACTUAL> actualType, ACTUAL actual)
      Creates a new assertion object for verifying specified bean object.
      Type Parameters:
      SELF - assertion type parameter
      ACTUAL - actual type parameter
      Parameters:
      selfClass - type of assertion; not null.
      actualType - type of actual; not null.
      actual - the actual bean object to verify.
      Returns:
      a new assertion object for verifying actual.
    • assertThatBean

      public static <SELF extends BeanAssert<SELF, ACTUAL>, ACTUAL> SELF assertThatBean(Class<SELF> selfClass, ACTUAL actual)
      Creates a new assertion object for verifying specified bean object.
      Type Parameters:
      SELF - assertion type parameter
      ACTUAL - actual type parameter
      Parameters:
      selfClass - type of assertion.
      actual - the actual bean object to verify; not null.
      Returns:
      a new assertion object for verifying actual.
    • assertThatVirtualBean

      public static <SELF extends BeanAssert<SELF, ACTUAL>, ACTUAL> SELF assertThatVirtualBean(Object actual)
      Creates a new assertion object for verifying specified bean object.
      Type Parameters:
      SELF - assertion type parameter
      ACTUAL - actual type parameter
      Parameters:
      actual - the actual bean object to verify; not null.
      Returns:
      a new assertion object for verifying actual.
    • assertThatProperty

      public static <ACTUAL> PropertyAssert<?,ACTUAL> assertThatProperty(ACTUAL actual)
      Creates a new assertion object for verifying specified value against a property of specific bean type.
      Type Parameters:
      ACTUAL - type of actual value
      Parameters:
      actual - the actual property value to verify.
      Returns:
      a new assertion instance for actual.
    • assertThatProperty

      public static <SELF extends PropertyAssert<SELF, ACTUAL>, ACTUAL> SELF assertThatProperty(Class<SELF> selfClass, Class<ACTUAL> actualClass, ACTUAL actual)
      Creates a new assertion object for verifying specified value against a property of specific bean type.
      Type Parameters:
      SELF - type of assertion
      ACTUAL - type of actual value
      Parameters:
      selfClass - assertion class.
      actualClass - actual class.
      actual - the actual property value to verify.
      Returns:
      a new assertion instance for actual.
    • assertThatProperty

      public static <SELF extends PropertyAssert<SELF, ACTUAL>, ACTUAL> SELF assertThatProperty(Class<SELF> selfClass, ACTUAL actual)
      Creates a new assertion object for verifying specified value against a property of specific bean type.
      Type Parameters:
      SELF - type of assertion
      ACTUAL - type of actual value
      Parameters:
      selfClass - assertion class.
      actual - the actual property value to verify.
      Returns:
      a new assertion instance for actual.
    • assertThatVirtualProperty

      public static <SELF extends PropertyAssert<SELF, ACTUAL>, ACTUAL> SELF assertThatVirtualProperty(Object actual)
      Creates a new assertion object for verifying specified value against a property of specific bean type.
      Type Parameters:
      SELF - type of assertion
      ACTUAL - type of actual value
      Parameters:
      actual - the actual property value to verify.
      Returns:
      a new assertion instance for actual.