Class 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
    • Constructor Detail

      • ShouldHavePropertyOrFieldWithValue

        private ShouldHavePropertyOrFieldWithValue​(Object actual,
                                                   String name,
                                                   Object expectedValue,
                                                   Object actualValue)
    • Method Detail

      • 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.