コード例 #1
0
  @Test
  public void requestToContains() throws Exception {
    this.request.setURI(new URI("http://foo.com/bar"));

    MockRestRequestMatchers.requestTo(containsString("bar")).match(this.request);
  }
コード例 #2
0
  @Test(expected = AssertionError.class)
  public void requestToNoMatch() throws Exception {
    this.request.setURI(new URI("http://foo.com/bar"));

    MockRestRequestMatchers.requestTo("http://foo.com/wrong").match(this.request);
  }