@Test public void shouldCreateMatcherThatMatchesAllFields() { // when HttpRequestMatcher httpRequestMapper = new MatcherBuilder().transformsToMatcher(httpRequest); // then assertTrue(httpRequestMapper.matches(httpRequest)); }
@Test public void shouldCreateMatcherThatIgnoresQueryString() { // when HttpRequestMatcher httpRequestMapper = new MatcherBuilder() .transformsToMatcher( new HttpRequest() .withMethod("GET") .withPath("some_path") .withQueryStringParameters() .withURL("http://www.example.com") .withBody(new StringBody("some_body", Body.Type.STRING)) .withHeaders(new Header("name", "value")) .withCookies(new Cookie("name", "value"))); // then assertTrue(httpRequestMapper.matches(httpRequest)); }