Class ReflectionAssertions

java.lang.Object
org.assertj.reflection.ReflectionAssertions

public final class ReflectionAssertions extends Object
Entry point for assertion methods for different reflection types. Each method in this class is a static factory for a type-specific assertion object.
  • Method Details

    • assertThat

      public static ClassAssert assertThat(Class<?> actual)
      Creates a new instance of ClassAssert.
      Parameters:
      actual - The actual value.
      Returns:
      The created assertion object.
    • assertThat

      public static ConstructorAssert assertThat(Constructor<?> actual)
      Creates a new instance of ConstructorAssert.
      Parameters:
      actual - The actual value.
      Returns:
      The created assertion object.
    • assertThat

      public static FieldAssert assertThat(Field actual)
      Creates a new instance of FieldAssert.
      Parameters:
      actual - The actual value.
      Returns:
      The created assertion object.
    • assertThat

      public static MethodAssert assertThat(Method actual)
      Creates a new instance of MethodAssert.
      Parameters:
      actual - The actual value.
      Returns:
      The created assertion object.