Class ShouldHavePropertyOrFieldWithValue

java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.ShouldHavePropertyOrFieldWithValue
All Implemented Interfaces:
ErrorMessageFactory

public class ShouldHavePropertyOrFieldWithValue extends BasicErrorMessageFactory
Creates an error message indicating that an assertion that verifies that a class has a field/property with a value.
Author:
Libor Ondrusek
  • Method Details

    • shouldHavePropertyOrFieldWithValue

      public static ErrorMessageFactory shouldHavePropertyOrFieldWithValue(Object actual, String name, Object expectedValue, Object actualValue)
      Parameters:
      actual - the actual value in the failed assertion.
      name - expected name of the field of this class
      expectedValue - expected value of the field of the class
      actualValue - actual value of the field of the class
      Returns:
      the created ErrorMessageFactory.