Class HmBody<T extends Body>

  • Type Parameters:
    T - Item type. Should be able to return own item
    All Implemented Interfaces:
    org.hamcrest.Matcher<T>, org.hamcrest.SelfDescribing

    public final class HmBody<T extends Body>
    extends org.hamcrest.TypeSafeMatcher<T>
    Body Matcher.

    This "matcher" tests given item body

    Since:
    2.0
    • Constructor Detail

      • HmBody

        public HmBody​(String value)
        Ctor.

        Will create instance with defaultCharset.

        Parameters:
        value - Value to test against
      • HmBody

        public HmBody​(String value,
                      Charset charset)
        Ctor.
        Parameters:
        value - Value to test against
        charset - Charset of given value
      • HmBody

        public HmBody​(byte[] value)
        Ctor.
        Parameters:
        value - Value to test against
      • HmBody

        public HmBody​(InputStream value)
        Ctor.
        Parameters:
        value - Value to test against.
    • Method Detail

      • describeTo

        public void describeTo​(org.hamcrest.Description description)
      • describeMismatchSafely

        public void describeMismatchSafely​(T item,
                                           org.hamcrest.Description description)
        Overrides:
        describeMismatchSafely in class org.hamcrest.TypeSafeMatcher<T extends Body>
      • matchesSafely

        public boolean matchesSafely​(T item)
        Specified by:
        matchesSafely in class org.hamcrest.TypeSafeMatcher<T extends Body>