Package com.github.tomakehurst.wiremock.http

Examples of com.github.tomakehurst.wiremock.http.Request


    public void shouldFailMatchWhenRequiredAbsentHeaderIsPresent() {
        ignoringNotifier();

        RequestPattern requestPattern = new RequestPattern(GET, "/without/header/fail");
        requestPattern.addHeader("X-My-Header", ValuePattern.absent());
        Request request = aRequest(context)
                .withUrl("/without/header/fail")
                .withMethod(GET)
                .withHeader("X-My-Header", "value")
                .build();
View Full Code Here


      one(notifier).info("URL /for/logging is match, but method GET is not");
    }});
   
    RequestPattern requestPattern = new RequestPattern(POST, "/for/logging");
   
    Request request = aRequest(context)
      .withUrl("/for/logging")
      .withMethod(GET)
      .build();
   
    requestPattern.isMatchedBy(request);
View Full Code Here

    RequestPattern requestPattern = new RequestPattern(POST, "/for/logging");
    ValuePattern headerPattern = new ValuePattern();
    headerPattern.setEqualTo("text/xml");
    requestPattern.addHeader("Content-Type", headerPattern);
   
    Request request = aRequest(context)
      .withUrl("/for/logging")
      .withMethod(POST)
      .withHeader("Content-Type", "text/plain")
      .build();
   
View Full Code Here

    }});
   
    RequestPattern requestPattern = new RequestPattern(POST, "/for/logging");
    requestPattern.setBodyPatterns(asList(ValuePattern.matches("Expected content")));
   
    Request request = aRequest(context)
      .withUrl("/for/logging")
      .withMethod(POST)
      .withBody("Actual Content")
      .build();
   
View Full Code Here

TOP

Related Classes of com.github.tomakehurst.wiremock.http.Request

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.