Class RequestMatcher

java.lang.Object
com.mx.path.testing.request.RequestMatcher

public class RequestMatcher extends Object
Allows rules to be defined for matching incoming requests

Examples:


   # Matches any request where request.getPath() == "account"
   RequestMatcher.withPath("accounts")

   # Matches any request where request.getPath() == "accounts"
   #   AND request.getMethod() == "GET"
   RequestMatcher.withPath("accounts").withMethod("GET")

   # Matches any request where request.equals(exactMatchRequest)
   RequestMatcher.withPath(exactMatchRequest)
 
  • Constructor Details

    • RequestMatcher

      public RequestMatcher()
  • Method Details