Class ShouldHavePropertyOrField

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldHavePropertyOrField
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion that verifies that a class has a given field/property.
    Author:
    Libor Ondrusek
    • Constructor Detail

      • ShouldHavePropertyOrField

        private ShouldHavePropertyOrField​(Object actual,
                                          String name)
    • Method Detail

      • shouldHavePropertyOrField

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