Class AssertionResult

java.lang.Object
org.mongounit.model.AssertionResult

public class AssertionResult extends Object
AssertionResult class represents internal assertion result.
  • Constructor Details

    • AssertionResult

      public AssertionResult()
      Default constructor.
    • AssertionResult

      public AssertionResult(boolean match, String message)
      Constructor.
      Parameters:
      match - Flag to indicate if the match was found or not.
      message - Optional message, which is usually used as an assertion failure message to give more details.
  • Method Details

    • builder

      public static AssertionResult.AssertionResultBuilder builder()
      Returns:
      Instance of the builder pattern version of the AssertionResult class.
    • isMatch

      public boolean isMatch()
      Returns:
      Flag to indicate if the match was found or not.
    • getMessage

      public String getMessage()
      Returns:
      Optional message, which is usually used as an assertion failure message to give more details.
    • setMatch

      public void setMatch(boolean match)
      Parameters:
      match - Flag to indicate if the match was found or not.
    • setMessage

      public void setMessage(String message)
      Parameters:
      message - Optional message, which is usually used as an assertion failure message to give more details.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object