Examples of BasicWatchers


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

            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/latest/issue/TST-2/watchers"), watchers.getSelf());
    assertEquals(1, watchers.getNumWatchers());
    assertEquals(new TimeTracking(0, 0, 145), issue.getTimeTracking());

    // attachments
    final Iterable<Attachment> attachments = issue.getAttachments();
    assertEquals(3, Iterables.size(attachments));
View Full Code Here

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

      }
    } else {
      worklogs = parseOptionalArray(shouldUseNestedValueAttribute, s, new JsonWeakParserForJsonObject<Worklog>(worklogJsonParser), FIELDS, WORKLOG_FIELD.id);
    }

    final BasicWatchers watchers = getOptionalField(shouldUseNestedValueAttribute, s,
        isJira5x0OrNewer ? WATCHER_FIELD.id : WATCHER_PRE_5_0_FIELD.id, watchersJsonParser);
    final TimeTracking timeTracking = getOptionalField(shouldUseNestedValueAttribute, s, TIMETRACKING_FIELD.id,
        isJira5x0OrNewer ? new TimeTrackingJsonParserV5() : new TimeTrackingJsonParser());

    final Set<String> labels = Sets.newHashSet(parseOptionalArrayNotNullable(shouldUseNestedValueAttribute, s,
View Full Code Here

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

    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

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

public class WatchersJsonParserTest {
    @Test
    public void testParseBasicWatchers() throws JSONException {
        final JsonParser<BasicWatchers> parser = WatchersJsonParserBuilder.createBasicWatchersParser();
        final BasicWatchers watcher = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/watcher/basic-valid.json"));
        assertEquals(false, watcher.isWatching());
        assertEquals(1, watcher.getNumWatchers());       

    }
View Full Code Here

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

      }
    } else {
      worklogs = parseOptionalArray(shouldUseNestedValueAttribute, s, new JsonWeakParserForJsonObject<Worklog>(worklogJsonParser), FIELDS, WORKLOG_FIELD.id);
    }

    final BasicWatchers watchers = getOptionalField(shouldUseNestedValueAttribute, s,
        isJira5x0OrNewer ? WATCHER_FIELD.id : WATCHER_PRE_5_0_FIELD.id, watchersJsonParser);
    final TimeTracking timeTracking = getOptionalField(shouldUseNestedValueAttribute, s, TIMETRACKING_FIELD.id,
        isJira5x0OrNewer ? new TimeTrackingJsonParserV5() : new TimeTrackingJsonParser());

    final Set<String> labels = Sets.newHashSet(parseOptionalArrayNotNullable(shouldUseNestedValueAttribute, s,
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.