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

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


    final Map<String, CimFieldInfo> fieldsInfo = parser.parse(
        getJsonObjectFromResource("/json/createmeta/fieldsinfo/valid-with-all-issue-types.json")
    );

    assertThat(fieldsInfo.get("resolution").getAllowedValues(), IsIterableContainingInAnyOrder.<Object>containsInAnyOrder(
        new Resolution(URI.create("http://localhost:2990/jira/rest/api/latest/resolution/1"), 1L, "Fixed", null),
        new Resolution(URI.create("http://localhost:2990/jira/rest/api/latest/resolution/2"), 2L, "Won't Fix", null),
        new Resolution(URI.create("http://localhost:2990/jira/rest/api/latest/resolution/3"), 3L, "Duplicate", null),
        new Resolution(URI.create("http://localhost:2990/jira/rest/api/latest/resolution/4"), 4L, "Incomplete", null),
        new Resolution(URI.create("http://localhost:2990/jira/rest/api/latest/resolution/5"), 5L, "Cannot Reproduce", null)
    ));
  }
View Full Code Here


  @Test
  @JiraBuildNumberDependent(BN_JIRA_5)
  public void testGetResolutions() {
    final Iterable<Resolution> resolutions = client.getMetadataClient().getResolutions().claim();
    assertEquals(5, Iterables.size(resolutions));
    final Resolution resolution = findEntityBySelfAddressSuffix(resolutions, "/1");
    assertEquals("Fixed", resolution.getName());
    assertEquals("A fix for this issue is checked into the tree and tested.", resolution.getDescription());
    assertNotNull(resolution.getSelf());
  }
View Full Code Here

    final String dueDateString = getOptionalFieldStringUnisex(issueJson, DUE_DATE_FIELD.id);
    final DateTime dueDate = dueDateString == null ? null : JsonParseUtil.parseDateTimeOrDate(dueDateString);

    final BasicPriority priority = getOptionalNestedField(issueJson, PRIORITY_FIELD.id, priorityJsonParser);
    final Resolution resolution = getOptionalNestedField(issueJson, RESOLUTION_FIELD.id, resolutionJsonParser);
    final User assignee = getOptionalNestedField(issueJson, ASSIGNEE_FIELD.id, userJsonParser);
    final User reporter = getOptionalNestedField(issueJson, REPORTER_FIELD.id, userJsonParser);

    final BasicProject project = projectJsonParser.parse(getFieldUnisex(issueJson, PROJECT_FIELD.id));
    final Collection<IssueLink> issueLinks;
View Full Code Here

  public Resolution parse(JSONObject json) throws JSONException {
    final String name = json.getString("name");
    final URI selfUri = JsonParseUtil.getSelfUri(json);
    final Long id = JsonParseUtil.getOptionalLong(json, "id");
    final String description = JsonParseUtil.getOptionalString(json, "description");
    return new Resolution(selfUri, id, name, description);
  }
View Full Code Here

public class ResolutionJsonParserTest {
  @Test
  public void testParse() throws Exception {
    final ResolutionJsonParser parser = new ResolutionJsonParser();
    final Resolution basicresolution = parser.parse(ResourceUtil
        .getJsonObjectFromResource("/json/resolution/valid.json"));
    Assert.assertEquals(new Resolution(
        toUri("http://localhost:8090/jira/rest/api/latest/resolution/4"), 4L, "Incomplete",
        "The problem is not completely described."), basicresolution);
  }
View Full Code Here

  @Test
  @JiraBuildNumberDependent(BN_JIRA_5)
  public void testGetResolutions() {
    final Iterable<Resolution> resolutions = client.getMetadataClient().getResolutions().claim();
    assertEquals(5, Iterables.size(resolutions));
    final Resolution resolution = findEntityBySelfAddressSuffix(resolutions, "/1");
    assertEquals("Fixed", resolution.getName());
    assertEquals("A fix for this issue is checked into the tree and tested.", resolution.getDescription());
    assertNotNull(resolution.getSelf());
  }
View Full Code Here

  @Override
  public Resolution parse(JSONObject json) throws JSONException {
    final BasicResolution basicResolution = basicResolutionJsonParser.parse(json);
    final String description = json.getString("description");
    return new Resolution(basicResolution.getSelf(), basicResolution.getName(), description);
  }
View Full Code Here

  @Test
  @JiraBuildNumberDependent(BN_JIRA_5)
  public void testGetResolutions() {
    final Iterable<Resolution> resolutions = client.getMetadataClient().getResolutions().claim();
    assertEquals(5, Iterables.size(resolutions));
    final Resolution resolution = findEntityBySelfAddressSuffix(resolutions, "/1");
    assertEquals("Fixed", resolution.getName());
    assertEquals("A fix for this issue is checked into the tree and tested.", resolution.getDescription());
    assertNotNull(resolution.getSelf());
  }
View Full Code Here

public class ResolutionJsonParserTest {
  @Test
  public void testParse() throws Exception {
    final ResolutionJsonParser parser = new ResolutionJsonParser();
    final Resolution resolution = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/resolution/complete.json"));
    Assert.assertEquals(new Resolution(toUri("http://localhost:8090/jira/rest/api/latest/resolution/4"), "Incomplete",
        "The problem is not completely described."), resolution);
  }
View Full Code Here

TOP

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

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.