Class Assertion<E,​M>

  • Type Parameters:
    E - type of expression to assert
    M - type of data to match on
    All Implemented Interfaces:
    Serializable, Comparable<org.apache.commons.lang3.tuple.Pair<E,​org.hamcrest.Matcher<M>>>, Map.Entry<E,​org.hamcrest.Matcher<M>>
    Direct Known Subclasses:
    JsonAssertion, JXPathAssertion

    public abstract class Assertion<E,​M>
    extends org.apache.commons.lang3.tuple.MutablePair<E,​org.hamcrest.Matcher<M>>
    Author:
    Adrian Herscu
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.apache.commons.lang3.tuple.MutablePair

        EMPTY_ARRAY, left, right
    • Constructor Summary

      Constructors 
      Constructor Description
      Assertion​(E expr, org.hamcrest.Matcher<M> matcher)
      Constructs an assertion.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String toString()  
      • Methods inherited from class org.apache.commons.lang3.tuple.MutablePair

        emptyArray, getLeft, getRight, of, of, ofNonNull, setLeft, setRight, setValue
      • Methods inherited from class org.apache.commons.lang3.tuple.Pair

        accept, apply, compareTo, equals, getKey, getValue, hashCode, toString
    • Constructor Detail

      • Assertion

        public Assertion​(E expr,
                         org.hamcrest.Matcher<M> matcher)
        Constructs an assertion.
        Parameters:
        expr - the expression
        matcher - the Hamcrest matcher; pass null to do a path existence assertion only
    • Method Detail

      • toString

        public String toString()
        Overrides:
        toString in class org.apache.commons.lang3.tuple.Pair<E,​org.hamcrest.Matcher<M>>