Class ExactClassMatcher<T>

java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeMatcher<T>
org.axonframework.test.matchers.ExactClassMatcher<T>
All Implemented Interfaces:
org.hamcrest.Matcher<T>, org.hamcrest.SelfDescribing

public class ExactClassMatcher<T> extends org.hamcrest.TypeSafeMatcher<T>
Matcher testing for exact classes.
Since:
4.6.2
Author:
Yoann CAPLAIN
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExactClassMatcher(Class<T> expectedClass)
    Construct a ExactClassMatcher that will match an actual value with the given expectedClass.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    describeTo(org.hamcrest.Description description)
     
    static <T> org.hamcrest.Matcher<T>
    exactClassOf(Class<T> expectedClass)
    Construct a ExactClassMatcher that will match an actual value with the given expectedClass.
    protected boolean
     

    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

    • ExactClassMatcher

      public ExactClassMatcher(Class<T> expectedClass)
      Construct a ExactClassMatcher that will match an actual value with the given expectedClass.
      Parameters:
      expectedClass - The object class to match with during TypeSafeMatcher.matches(Object).
  • Method Details

    • exactClassOf

      public static <T> org.hamcrest.Matcher<T> exactClassOf(Class<T> expectedClass)
      Construct a ExactClassMatcher that will match an actual value with the given expectedClass.
      Parameters:
      expectedClass - The object class to match with during TypeSafeMatcher.matches(Object).
      Returns:
      a matcher that matches based on the class
    • matchesSafely

      protected boolean matchesSafely(T item)
      Specified by:
      matchesSafely in class org.hamcrest.TypeSafeMatcher<T>
    • describeTo

      public void describeTo(org.hamcrest.Description description)