Class TestingMatcher

All Implemented Interfaces:
IHeaderMatcher

public class TestingMatcher extends AbstractHeaderMatcher
A matcher for testing.
  • Constructor Details

    • TestingMatcher

      public TestingMatcher()
      Constructs a matcher with an id of "dfltMtch" that does not match anything.
    • TestingMatcher

      public TestingMatcher(boolean result)
      Constructs a matcher with the specified id and matching result.
      Parameters:
      result - if true will match everything, otherwise it matches nothing.
    • TestingMatcher

      public TestingMatcher(String id, boolean result)
      Constructs a matcher with the specified id and matching result.
      Parameters:
      id - the id for this matcher.
      result - if true will match everything, otherwise it matches nothing.
    • TestingMatcher

      public TestingMatcher(String id, boolean... results)
      Constructs a matcher with the specified id that returns the matching values in order. Will throw NullPointerException if more matches() are called than there are results.
      Parameters:
      id - the id of the matcher.
      results - the result for each call to match.
  • Method Details

    • matches

      public final boolean matches(IHeaders headers)
    • reset

      public void reset()