Class MessageCodeMatcher
- java.lang.Object
-
- org.hamcrest.BaseMatcher<T>
-
- org.hamcrest.TypeSafeMatcher<org.faktorips.runtime.Message>
-
- org.faktorips.testsupport.matchers.MessageCodeMatcher
-
- All Implemented Interfaces:
org.hamcrest.Matcher<org.faktorips.runtime.Message>,org.hamcrest.SelfDescribing
public class MessageCodeMatcher extends org.hamcrest.TypeSafeMatcher<org.faktorips.runtime.Message>Matches aMessageif it'smessage codeis the givenmessageCode.
-
-
Constructor Summary
Constructors Constructor Description MessageCodeMatcher(java.lang.String messageCode)MessageCodeMatcher(java.lang.String messageCode, boolean expectMessage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddescribeTo(org.hamcrest.Description description)protected booleanmatchesSafely(org.faktorips.runtime.Message m)-
Methods inherited from class org.hamcrest.TypeSafeMatcher
describeMismatch, describeMismatchSafely, matches
-
-
-
-
Constructor Detail
-
MessageCodeMatcher
public MessageCodeMatcher(@CheckForNull java.lang.String messageCode)- Parameters:
messageCode- the expected message code
-
MessageCodeMatcher
public MessageCodeMatcher(@CheckForNull java.lang.String messageCode, boolean expectMessage)- Parameters:
messageCode- the expected message codeexpectMessage- whether a message is expected.trueif a message is expected,falseif no message with the given message code is expected (negates result).
-
-