Examples of watch()


Examples of com.atlassian.jira.rest.client.api.IssueRestClient.watch()

  @Test
  public void testRemoveWatcherUnauthorized() {
    final IssueRestClient issueClient = client.getIssueClient();
    final Issue issue1 = issueClient.getIssue("TST-1").claim();
    issueClient.watch(issue1.getWatchers().getSelf()).claim();

    setUser1();
    final IssueRestClient issueClient2 = client.getIssueClient();
    assertErrorCode(Response.Status.UNAUTHORIZED,
        "User 'wseliga' is not allowed to remove watchers from issue 'TST-1'", new Runnable() {
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.IssueRestClient.watch()

    final IssueRestClient issueClient = client.getIssueClient();
    final Issue issue = issueClient.getIssue("TST-1").claim();
    Assert.assertThat(client.getIssueClient().getWatchers(issue.getWatchers().getSelf()).claim()
        .getUsers(), hasItem(IntegrationTestUtil.USER1));
    // JIRA allows to watch already watched issue by you - such action effectively has no effect
    issueClient.watch(issue.getWatchers().getSelf()).claim();
    Assert.assertThat(client.getIssueClient().getWatchers(issue.getWatchers().getSelf()).claim()
        .getUsers(), hasItem(IntegrationTestUtil.USER1));
  }

  @Test
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.IssueRestClient.watch()

    final Issue issue1 = issueClient.getIssue("TST-1").claim();

    Assert.assertThat(issueClient.getWatchers(issue1.getWatchers().getSelf()).claim()
        .getUsers(), not(hasItem(IntegrationTestUtil.USER_ADMIN)));

    issueClient.watch(issue1.getWatchers().getSelf()).claim();
    Assert.assertThat(issueClient.getWatchers(issue1.getWatchers().getSelf()).claim()
        .getUsers(), hasItem(IntegrationTestUtil.USER_ADMIN));

    issueClient.unwatch(issue1.getWatchers().getSelf()).claim();
    Assert.assertThat(issueClient.getWatchers(issue1.getWatchers().getSelf()).claim()
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.IssueRestClient.watch()

  @Test
  public void testRemoveWatcherUnauthorized() {
    final IssueRestClient issueClient = client.getIssueClient();
    final Issue issue1 = issueClient.getIssue("TST-1").claim();
    issueClient.watch(issue1.getWatchers().getSelf()).claim();

    setUser1();
    final IssueRestClient issueClient2 = client.getIssueClient();
    assertErrorCode(Response.Status.UNAUTHORIZED,
        "User 'wseliga' is not allowed to remove watchers from issue 'TST-1'", new Runnable() {
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.IssueRestClient.watch()

    final IssueRestClient issueClient = client.getIssueClient();
    final Issue issue = issueClient.getIssue("TST-1").claim();
    Assert.assertThat(client.getIssueClient().getWatchers(issue.getWatchers().getSelf()).claim()
        .getUsers(), hasItem(IntegrationTestUtil.USER1));
    // JIRA allows to watch already watched issue by you - such action effectively has no effect
    issueClient.watch(issue.getWatchers().getSelf()).claim();
    Assert.assertThat(client.getIssueClient().getWatchers(issue.getWatchers().getSelf()).claim()
        .getUsers(), hasItem(IntegrationTestUtil.USER1));
  }

  @Test
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.IssueRestClient.watch()

    final Issue issue1 = issueClient.getIssue("TST-1").claim();

    Assert.assertThat(issueClient.getWatchers(issue1.getWatchers().getSelf()).claim()
        .getUsers(), not(hasItem(IntegrationTestUtil.USER_ADMIN)));

    issueClient.watch(issue1.getWatchers().getSelf()).claim();
    Assert.assertThat(issueClient.getWatchers(issue1.getWatchers().getSelf()).claim()
        .getUsers(), hasItem(IntegrationTestUtil.USER_ADMIN));

    issueClient.unwatch(issue1.getWatchers().getSelf()).claim();
    Assert.assertThat(issueClient.getWatchers(issue1.getWatchers().getSelf()).claim()
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.IssueRestClient.watch()

    final Issue issue1 = issueClient.getIssue("TST-1").claim();

    Assert.assertThat(issueClient.getWatchers(issue1.getWatchers().getSelf()).claim()
        .getUsers(), not(hasItem(IntegrationTestUtil.USER_ADMIN)));

    issueClient.watch(issue1.getWatchers().getSelf()).claim();
    Assert.assertThat(issueClient.getWatchers(issue1.getWatchers().getSelf()).claim()
        .getUsers(), hasItem(IntegrationTestUtil.USER_ADMIN));

    issueClient.unwatch(issue1.getWatchers().getSelf()).claim();
    Assert.assertThat(issueClient.getWatchers(issue1.getWatchers().getSelf()).claim()
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.IssueRestClient.watch()

  @Test
  public void testRemoveWatcherUnauthorized() {
    final IssueRestClient issueClient = client.getIssueClient();
    final Issue issue1 = issueClient.getIssue("TST-1").claim();
    issueClient.watch(issue1.getWatchers().getSelf()).claim();

    setUser1();
    final IssueRestClient issueClient2 = client.getIssueClient();
    assertErrorCode(Response.Status.UNAUTHORIZED,
        "User 'wseliga' is not allowed to remove watchers from issue 'TST-1'", new Runnable() {
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.IssueRestClient.watch()

    final IssueRestClient issueClient = client.getIssueClient();
    final Issue issue = issueClient.getIssue("TST-1").claim();
    Assert.assertThat(client.getIssueClient().getWatchers(issue.getWatchers().getSelf()).claim()
        .getUsers(), hasItem(IntegrationTestUtil.USER1));
    // JIRA allows to watch already watched issue by you - such action effectively has no effect
    issueClient.watch(issue.getWatchers().getSelf()).claim();
    Assert.assertThat(client.getIssueClient().getWatchers(issue.getWatchers().getSelf()).claim()
        .getUsers(), hasItem(IntegrationTestUtil.USER1));
  }

  @Test
View Full Code Here

Examples of com.gitblit.models.TicketModel.Change.watch()

              public void onClick(AjaxRequestTarget target) {
                Status status = getModel().getObject();
                Change change = new Change(user.username);
                change.setField(Field.status, status);
                if (!ticket.isWatching(user.username)) {
                  change.watch(user.username);
                }
                TicketModel update = app().tickets().updateTicket(repository, ticket.number, change);
                app().tickets().createNotifier().sendMailing(update);
                setResponsePage(TicketsPage.class, getPageParameters());
              }
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.