Package org.sonar.wsclient.issue.internal

Examples of org.sonar.wsclient.issue.internal.DefaultIssueClient


  /**
   * New client to interact with web services related to issues
   */
  public IssueClient issueClient() {
    return new DefaultIssueClient(requestFactory);
  }
View Full Code Here


  @Test
  public void should_encode_characters() {
    HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url());
    httpServer.stubResponseBody("{\"issues\": [{\"key\": \"ABCDE\"}]}");

    IssueClient client = new DefaultIssueClient(requestFactory);
    client.find(IssueQuery.create().issues("ABC DE"));
    assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/search?issues=ABC%20DE");

    client.find(IssueQuery.create().issues("ABC+BDE"));
    assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/search?issues=ABC%2BBDE");

    client.find(IssueQuery.create().createdAfter(toDate("2013-01-01")));
    // TODO complete assertion with timestamp when test is isolated from default timezone
    assertThat(httpServer.requestedPath()).startsWith("/api/issues/search?createdAfter=2013-01-01T");
  }
View Full Code Here

TOP

Related Classes of org.sonar.wsclient.issue.internal.DefaultIssueClient

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.