Class StatusTypeMatchers


  • public final class StatusTypeMatchers
    extends Object
    Provides Hamcrest matcher utilities for matching StatusType.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.hamcrest.Matcher<com.spotify.apollo.StatusType> belongsToFamily​(com.spotify.apollo.StatusType.Family family)
      Builds a matcher for StatusTypes belonging to a StatusType.Family.
      static org.hamcrest.Matcher<com.spotify.apollo.StatusType> withCode​(int code)
      Builds a matcher for StatusTypes with specified status code.
      static org.hamcrest.Matcher<com.spotify.apollo.StatusType> withCode​(com.spotify.apollo.StatusType code)
      Builds a matcher for StatusTypes whose StatusType.code() matches the specified StatusType's status code.
      static org.hamcrest.Matcher<com.spotify.apollo.StatusType> withReasonPhrase​(org.hamcrest.Matcher<String> reasonPhraseMatcher)
      Builds a matcher for StatusTypes with matching reason phrase.
    • Method Detail

      • belongsToFamily

        public static org.hamcrest.Matcher<com.spotify.apollo.StatusType> belongsToFamily​(com.spotify.apollo.StatusType.Family family)
        Builds a matcher for StatusTypes belonging to a StatusType.Family.
        Parameters:
        family - The StatusType.Family to match.
        Returns:
        A matcher
      • withReasonPhrase

        public static org.hamcrest.Matcher<com.spotify.apollo.StatusType> withReasonPhrase​(org.hamcrest.Matcher<String> reasonPhraseMatcher)
        Builds a matcher for StatusTypes with matching reason phrase.
        Parameters:
        reasonPhraseMatcher - Matcher for the reason phrase.
        Returns:
        A matcher
      • withCode

        public static org.hamcrest.Matcher<com.spotify.apollo.StatusType> withCode​(int code)
        Builds a matcher for StatusTypes with specified status code.
        Parameters:
        code - The status code to match.
        Returns:
        A matcher
      • withCode

        public static org.hamcrest.Matcher<com.spotify.apollo.StatusType> withCode​(com.spotify.apollo.StatusType code)
        Builds a matcher for StatusTypes whose StatusType.code() matches the specified StatusType's status code. Reason phrases are not included in the comparison.
        Parameters:
        code - The StatusType whose code should match.