Class PayloadMatcher<T extends Message>

java.lang.Object
org.hamcrest.BaseMatcher<T>
org.axonframework.test.matchers.PayloadMatcher<T>
Type Parameters:
T - The type of Message the matcher can match against
All Implemented Interfaces:
org.hamcrest.Matcher<T>, org.hamcrest.SelfDescribing

public class PayloadMatcher<T extends Message> extends org.hamcrest.BaseMatcher<T>
Matcher that matches any message (e.g. Event, Command) who's payload matches the given matcher.
Since:
2.0
Author:
Allard Buijze
  • Constructor Summary

    Constructors
    Constructor
    Description
    PayloadMatcher(org.hamcrest.Matcher<?> payloadMatcher)
    Constructs an instance with the given payloadMatcher.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    describeTo(org.hamcrest.Description description)
     
    boolean
     

    Methods inherited from class org.hamcrest.BaseMatcher

    _dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, isNotNull, toString

    Methods inherited from class java.lang.Object

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

    • PayloadMatcher

      public PayloadMatcher(org.hamcrest.Matcher<?> payloadMatcher)
      Constructs an instance with the given payloadMatcher.
      Parameters:
      payloadMatcher - The matcher that must match the Message's payload.
  • Method Details

    • matches

      public boolean matches(Object item)
    • describeTo

      public void describeTo(org.hamcrest.Description description)