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

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


  @Override
  public Resolution parse(JSONObject json) throws JSONException {
    final BasicResolution basicResolution = basicResolutionJsonParser.parse(json);
    final String description = json.getString("description");
        final Long id = JsonParseUtil.getOptionalLong(json, "id");
    return new Resolution(basicResolution.getSelf(), basicResolution.getName(), description, id);
  }
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.", null), resolution);
  }
View Full Code Here

    final Issue resolvedIssue = client.getIssueClient().getIssue("TST-2", pm);
    final BasicResolution basicResolution = resolvedIssue.getResolution();
    assertNotNull(basicResolution);

    final Resolution resolution = client.getMetadataClient().getResolution(basicResolution.getSelf(), pm);
    assertEquals(basicResolution.getName(), resolution.getName());
    assertEquals(basicResolution.getSelf(), resolution.getSelf());
    assertEquals("A fix for this issue is checked into the tree and tested.", resolution.getDescription());
  }
View Full Code Here

  @Test
  @JiraBuildNumberDependent(BN_JIRA_5)
  public void testGetResolutions() {
    final Iterable<Resolution> resolutions = client.getMetadataClient().getResolutions(pm);
    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 Issue resolvedIssue = client.getIssueClient().getIssue("TST-2", pm);
    final BasicResolution basicResolution = resolvedIssue.getResolution();
    assertNotNull(basicResolution);

    final Resolution resolution = client.getMetadataClient().getResolution(basicResolution.getSelf(), pm);
    assertEquals(basicResolution.getName(), resolution.getName());
    assertEquals(basicResolution.getSelf(), resolution.getSelf());
    assertEquals("A fix for this issue is checked into the tree and tested.", resolution.getDescription());
  }
View Full Code Here

  private final BasicResolutionJsonParser basicResolutionJsonParser = new BasicResolutionJsonParser();
  @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

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

    final Issue resolvedIssue = client.getIssueClient().getIssue("TST-2", pm);
    final BasicResolution basicResolution = resolvedIssue.getResolution();
    assertNotNull(basicResolution);

    final Resolution resolution = client.getMetadataClient().getResolution(basicResolution.getSelf(), pm);
    assertEquals(basicResolution.getName(), resolution.getName());
    assertEquals(basicResolution.getSelf(), resolution.getSelf());
    assertEquals("A fix for this issue is checked into the tree and tested.", resolution.getDescription());
  }
View Full Code Here

  @Test
  @JiraBuildNumberDependent(BN_JIRA_5)
  public void testGetResolutions() {
    final Iterable<Resolution> resolutions = client.getMetadataClient().getResolutions(pm);
    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

TOP

Related Classes of com.atlassian.jira.rest.client.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.