Examples of searchJql()


Examples of com.atlassian.jira.rest.client.api.SearchRestClient.searchJql()

  }

  @Test
  public void jqlSearchWithMinimalFieldSetShouldReturnParseableIssues() throws Exception {
    final SearchRestClient searchClient = client.getSearchClient();
    final SearchResult searchResult = searchClient.searchJql("key=TST-1", null, null, REQUIRED_ISSUE_FIELDS).claim();
    final Issue issue = Iterables.getOnlyElement(searchResult.getIssues());
    assertEquals("TST-1", issue.getKey());
    assertEquals("My sample test", issue.getSummary());
    assertEquals("Bug", issue.getIssueType().getName());
    assertEquals(toDateTime("2010-07-23T12:16:56.000"), issue.getCreationDate());
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.SearchRestClient.searchJql()

    for (final String missingField : REQUIRED_ISSUE_FIELDS) {
      final Set<String> fieldsToRetrieve = Sets.difference(REQUIRED_ISSUE_FIELDS, Sets.newHashSet(missingField));

      try {
        searchClient.searchJql(null, 1, 0, fieldsToRetrieve).claim();
        throw new java.lang.AssertionError(String.format(
            "The above statement should throw exception. fieldsToRetrieve = %s, fields = %s, requiredFields = %s",
            missingField, fieldsToRetrieve, REQUIRED_ISSUE_FIELDS));
      } catch (RestClientException e) {
        final String expectedMessage = String.format(
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.SearchRestClient.searchJql()

  }

  @Test
  public void jqlSearchWithMinimalFieldSetShouldReturnParseableIssues() throws Exception {
    final SearchRestClient searchClient = client.getSearchClient();
    final SearchResult searchResult = searchClient.searchJql("key=TST-1", null, null, REQUIRED_ISSUE_FIELDS).claim();
    final Issue issue = Iterables.getOnlyElement(searchResult.getIssues());
    assertEquals("TST-1", issue.getKey());
    assertEquals("My sample test", issue.getSummary());
    assertEquals("Bug", issue.getIssueType().getName());
    assertEquals(toDateTime("2010-07-23T12:16:56.000"), issue.getCreationDate());
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.SearchRestClient.searchJql()

    for (final String missingField : REQUIRED_ISSUE_FIELDS) {
      final Set<String> fieldsToRetrieve = Sets.difference(REQUIRED_ISSUE_FIELDS, Sets.newHashSet(missingField));

      try {
        searchClient.searchJql(null, 1, 0, fieldsToRetrieve).claim();
        throw new java.lang.AssertionError(String.format(
            "The above statement should throw exception. fieldsToRetrieve = %s, fields = %s, requiredFields = %s",
            missingField, fieldsToRetrieve, REQUIRED_ISSUE_FIELDS));
      } catch (RestClientException e) {
        final String expectedMessage = String.format(
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.SearchRestClient.searchJql()

  }

  @Test
  public void jqlSearchWithMinimalFieldSetShouldReturnParseableIssues() throws Exception {
    final SearchRestClient searchClient = client.getSearchClient();
    final SearchResult searchResult = searchClient.searchJql("key=TST-1", null, null, REQUIRED_ISSUE_FIELDS).claim();
    final Issue issue = Iterables.getOnlyElement(searchResult.getIssues());
    assertEquals("TST-1", issue.getKey());
    assertEquals("My sample test", issue.getSummary());
    assertEquals("Bug", issue.getIssueType().getName());
    assertEquals(toDateTime("2010-07-23T12:16:56.000"), issue.getCreationDate());
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.SearchRestClient.searchJql()

    for (final String missingField : requiredFields) {
      final Set<String> fieldsToRetrieve = Sets.difference(requiredFields, Sets.newHashSet(missingField));

      try {
        searchClient.searchJql(null, 1, 0, Joiner.on(",").join(fieldsToRetrieve)).claim();
        throw new java.lang.AssertionError(String.format(
            "The above statement should throw exception. fieldsToRetrieve = %s, fields = %s, requiredFields = %s",
            missingField, fieldsToRetrieve, requiredFields));
      } catch (RestClientException e) {
        final String expectedMessage = String.format(
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.SearchRestClient.searchJql()

  }

  @Test
  public void jqlSearchWithMinimalFieldSetShouldReturnParseableIssues() throws Exception {
    final SearchRestClient searchClient = client.getSearchClient();
    final SearchResult searchResult = searchClient.searchJql("key=TST-1", null, null, REQUIRED_ISSUE_FIELDS).claim();
    final Issue issue = Iterables.getOnlyElement(searchResult.getIssues());
    assertEquals("TST-1", issue.getKey());
    assertEquals("My sample test", issue.getSummary());
    assertEquals("Bug", issue.getIssueType().getName());
    assertEquals(toDateTime("2010-07-23T12:16:56.000"), issue.getCreationDate());
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.SearchRestClient.searchJql()

    for (final String missingField : REQUIRED_ISSUE_FIELDS) {
      final Set<String> fieldsToRetrieve = Sets.difference(REQUIRED_ISSUE_FIELDS, Sets.newHashSet(missingField));

      try {
        searchClient.searchJql(null, 1, 0, fieldsToRetrieve).claim();
        throw new java.lang.AssertionError(String.format(
            "The above statement should throw exception. fieldsToRetrieve = %s, fields = %s, requiredFields = %s",
            missingField, fieldsToRetrieve, REQUIRED_ISSUE_FIELDS));
      } catch (RestClientException e) {
        final String expectedMessage = String.format(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.