Package com.atlassian.jira.rest.client.api.domain

Examples of com.atlassian.jira.rest.client.api.domain.BasicWatchers


    assertEquals(expectedProject, issue.getProject());

    final BasicVotes expectedVotes = new BasicVotes(toUri("http://localhost:8090/jira/rest/api/2/issue/TST-7/votes"), 0, false);
    assertEquals(expectedVotes, issue.getVotes());

    final BasicWatchers expectedWatchers = new BasicWatchers(toUri("http://localhost:8090/jira/rest/api/2/issue/TST-7/watchers"), false, 0);
    assertEquals(expectedWatchers, issue.getWatchers());

    final IssueType expectedIssueType = new IssueType(toUri("http://localhost:8090/jira/rest/api/2/issuetype/3"), 3L, "Task", false, "A task that needs to be done.", toUri("http://localhost:8090/jira/images/icons/task.gif"));
    assertEquals(expectedIssueType, issue.getIssueType());
  }
View Full Code Here


        new IssueLink("TST-1", toUri("http://localhost:8090/jira/rest/api/2/issue/10000"),
            new IssueLinkType("Duplicate", "is duplicated by", IssueLinkType.Direction.INBOUND))
    ));

    // watchers
    final BasicWatchers watchers = issue.getWatchers();
    assertFalse(watchers.isWatching());
    assertEquals(toUri("http://localhost:8090/jira/rest/api/2/issue/TST-2/watchers"), watchers.getSelf());
    assertEquals(1, watchers.getNumWatchers());

    // time tracking
    assertEquals(new TimeTracking(0, 0, 145), issue.getTimeTracking());

    // attachments
View Full Code Here

    assertEquals(toDateTime("2010-09-22T18:06:32.000"), issue.getCreationDate());
    assertEquals(IntegrationTestUtil.USER1_FULL, issue.getReporter());
    assertEquals(IntegrationTestUtil.USER_ADMIN_FULL, issue.getAssignee());
    assertEquals(new BasicProject(resolveURI(projectSelf), "TST", 10000L, "Test Project"), issue.getProject());
    assertEquals(new BasicVotes(resolveURI("rest/api/2/issue/TST-7/votes"), 0, false), issue.getVotes());
    assertEquals(new BasicWatchers(resolveURI("rest/api/2/issue/TST-7/watchers"), false, 0), issue.getWatchers());
    assertThat(issue.getIssueType(), notNullValue());
    assertThat(issue.getIssueType().getSelf(), is(resolveURI("rest/api/2/issuetype/3")));
    assertThat(issue.getIssueType().getId(), is(3L));
    assertThat(issue.getIssueType().getName(), is("Task"));
    assertThat(issue.getIssueType().isSubtask(), is(false));
View Full Code Here

    assertEquals(toDateTime("2010-09-22T18:06:32.000"), issue.getCreationDate());
    assertEquals(IntegrationTestUtil.USER1_FULL, issue.getReporter());
    assertEquals(IntegrationTestUtil.USER_ADMIN_FULL, issue.getAssignee());
    assertEquals(new BasicProject(resolveURI("rest/api/2/project/TST"), "TST", "Test Project"), issue.getProject());
    assertEquals(new BasicVotes(resolveURI("rest/api/2/issue/TST-7/votes"), 0, false), issue.getVotes());
    assertEquals(new BasicWatchers(resolveURI("rest/api/2/issue/TST-7/watchers"), false, 0), issue.getWatchers());
    assertEquals(new BasicIssueType(resolveURI("rest/api/2/issuetype/3"), 3L, "Task", false), issue.getIssueType());
  }
View Full Code Here

    } else {
      worklogs = Collections.emptyList();
    }


    final BasicWatchers watchers = getOptionalNestedField(issueJson, WATCHER_FIELD.id, watchersJsonParser);
    final TimeTracking timeTracking = getOptionalNestedField(issueJson, TIMETRACKING_FIELD.id, new TimeTrackingJsonParserV5());

    final Set<String> labels = Sets
        .newHashSet(parseOptionalArrayNotNullable(issueJson, jsonWeakParserForString, FIELDS, LABELS_FIELD.id));
View Full Code Here

    assertEquals(toDateTime("2010-09-22T18:06:32.000"), issue.getCreationDate());
    assertEquals(IntegrationTestUtil.USER1_FULL, issue.getReporter());
    assertEquals(IntegrationTestUtil.USER_ADMIN_FULL, issue.getAssignee());
    assertEquals(new BasicProject(resolveURI("rest/api/2/project/TST"), "TST", "Test Project"), issue.getProject());
    assertEquals(new BasicVotes(resolveURI("rest/api/2/issue/TST-7/votes"), 0, false), issue.getVotes());
    assertEquals(new BasicWatchers(resolveURI("rest/api/2/issue/TST-7/watchers"), false, 0), issue.getWatchers());
    assertEquals(new BasicIssueType(resolveURI("rest/api/2/issuetype/3"), 3L, "Task", false), issue.getIssueType());
  }
View Full Code Here

    // now let's vote for it
    restClient.getIssueClient().vote(issue.getVotesUri()).claim();

    // now let's watch it
    final BasicWatchers watchers = issue.getWatchers();
    if (watchers != null) {
      restClient.getIssueClient().watch(watchers.getSelf()).claim();
    }

    // now let's start progress on this issue
    final Iterable<Transition> transitions = restClient.getIssueClient().getTransitions(issue.getTransitionsUri()).claim();
    final Transition startProgressTransition = getTransitionByName(transitions, "Start Progress");
View Full Code Here

      // now let's vote for it
      restClient.getIssueClient().vote(issue.getVotesUri()).claim();

      // now let's watch it
      final BasicWatchers watchers = issue.getWatchers();
      if (watchers != null) {
        restClient.getIssueClient().watch(watchers.getSelf()).claim();
      }

      // now let's start progress on this issue
      final Iterable<Transition> transitions = restClient.getIssueClient().getTransitions(issue.getTransitionsUri()).claim();
      final Transition startProgressTransition = getTransitionByName(transitions, "Start Progress");
View Full Code Here

  private static BasicWatchers parseValueImpl(JSONObject json) throws JSONException {
    final URI self = JsonParseUtil.getSelfUri(json);
    final boolean isWatching = json.getBoolean("isWatching");
    final int numWatchers = json.getInt("watchCount");
    return new BasicWatchers(self, isWatching, numWatchers);
  }
View Full Code Here

    } else {
      worklogs = Collections.emptyList();
    }


    final BasicWatchers watchers = getOptionalNestedField(s, WATCHER_FIELD.id, watchersJsonParser);
    final TimeTracking timeTracking = getOptionalNestedField(s, TIMETRACKING_FIELD.id, new TimeTrackingJsonParserV5());

    final Set<String> labels = Sets
        .newHashSet(parseOptionalArrayNotNullable(s, jsonWeakParserForString, FIELDS, LABELS_FIELD.id));
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.api.domain.BasicWatchers

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.