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

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


  @Test
  public void testParseProjectWithBasicRoles() throws JSONException, URISyntaxException {
    final Project project = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/project/project-jira-5-0.json"));
    final Iterable<BasicProjectRole> projectRoles = project.getProjectRoles();
    Assert.assertThat(projectRoles, IsIterableContainingInAnyOrder.containsInAnyOrder(
        new BasicProjectRole(TestUtil
            .toUri("http://localhost:2990/jira/rest/api/latest/project/TST/role/10000"), "Users"),
        new BasicProjectRole(TestUtil
            .toUri("http://localhost:2990/jira/rest/api/latest/project/TST/role/10001"), "Developers"),
        new BasicProjectRole(TestUtil
            .toUri("http://localhost:2990/jira/rest/api/latest/project/TST/role/10002"), "Administrators")
    ));
  }
View Full Code Here


            JsonParseUtil.getStringKeys(json),
            new Function<String, BasicProjectRole>() {
              @Override
              public BasicProjectRole apply(@Nullable final String key) {
                try {
                  return new BasicProjectRole(JsonParseUtil.parseURI(json.getString(key)), key);
                } catch (JSONException e) {
                  throw new RestClientException(e);
                }
              }
            }
View Full Code Here

  @Test
  public void testParseProjectWithBasicRoles() throws JSONException, URISyntaxException {
    final Project project = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/project/project-jira-5-0.json"));
    final Iterable<BasicProjectRole> projectRoles = project.getProjectRoles();
    Assert.assertThat(projectRoles, IsIterableContainingInAnyOrder.containsInAnyOrder(
        new BasicProjectRole(TestUtil
            .toUri("http://localhost:2990/jira/rest/api/latest/project/TST/role/10000"), "Users"),
        new BasicProjectRole(TestUtil
            .toUri("http://localhost:2990/jira/rest/api/latest/project/TST/role/10001"), "Developers"),
        new BasicProjectRole(TestUtil
            .toUri("http://localhost:2990/jira/rest/api/latest/project/TST/role/10002"), "Administrators")
    ));
  }
View Full Code Here

TOP

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

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.