Class MessageListCodeMatcher

java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeMatcher<org.faktorips.runtime.MessageList>
org.faktorips.testsupport.matchers.MessageListCodeMatcher
All Implemented Interfaces:
org.hamcrest.Matcher<org.faktorips.runtime.MessageList>, org.hamcrest.SelfDescribing

public class MessageListCodeMatcher extends org.hamcrest.TypeSafeMatcher<org.faktorips.runtime.MessageList>
Checks whether a MessageList contains a Message with a certain message code.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    MessageListCodeMatcher(String messageCode, boolean expectMessage)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    describeTo(org.hamcrest.Description description)
     
    boolean
    matchesSafely(org.faktorips.runtime.MessageList list)
     

    Methods inherited from class org.hamcrest.TypeSafeMatcher

    describeMismatch, describeMismatchSafely, matches

    Methods inherited from class org.hamcrest.BaseMatcher

    _dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MessageListCodeMatcher

      public MessageListCodeMatcher(@CheckForNull String messageCode)
      Parameters:
      messageCode - the expected message code
    • MessageListCodeMatcher

      public MessageListCodeMatcher(@CheckForNull String messageCode, boolean expectMessage)
      Parameters:
      messageCode - the expected message code
      expectMessage - whether a message is expected. true if a message is expected, false if no message with the given message code is expected (negates result).
  • Method Details

    • describeTo

      public void describeTo(org.hamcrest.Description description)
    • matchesSafely

      public boolean matchesSafely(org.faktorips.runtime.MessageList list)
      Specified by:
      matchesSafely in class org.hamcrest.TypeSafeMatcher<org.faktorips.runtime.MessageList>