Class MatcherCondition<T>

  • All Implemented Interfaces:
    org.assertj.core.api.Descriptable<org.assertj.core.api.Condition<T>>

    public class MatcherCondition<T>
    extends org.assertj.core.api.Condition<T>
    • Constructor Detail

      • MatcherCondition

        public MatcherCondition​(@NotNull
                                org.hamcrest.TypeSafeMatcher<T> matcher)
    • Method Detail

      • cond

        @NotNull
        public static <T> MatcherCondition<T> cond​(@NotNull
                                                   org.hamcrest.TypeSafeMatcher<T> matcher)
        Returns assertj condition created from harmcrest matcher. The condition uses matcher.toString() as a description.
        Type Parameters:
        T - type of checked value
        Parameters:
        matcher - matcher to create condition from
        Returns:
        see above
      • matches

        public boolean matches​(T value)
        Specified by:
        matches in class org.assertj.core.api.Condition<T>