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

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


  // This test checks the special "admin" case.
  // Id field should not be optional, unfortunately it is not returned for an admin role actor.
  @Test
  public void testParseProjectRoleContainingActorWithoutIdField() throws JSONException, MalformedURLException {
    final ProjectRole role = parser.parse(ResourceUtil
        .getJsonObjectFromResource("/json/role/valid-role-without-user-actor-id.json"));
    Assert.assertNotNull(role);
    Assert.assertEquals("Users", role.getName());
    Assert.assertEquals(TestUtil.toUri("http://localhost:2990/jira/rest/api/2/project/TST/role/10000"), role.getSelf());
    Assert.assertEquals(10000, role.getId().longValue());
    Assert.assertEquals("A project role that represents users in a project", role.getDescription());
    Assert.assertThat(
        role.getActors(),
        IsIterableContainingInAnyOrder.containsInAnyOrder(
            new RoleActor(null, "Administrator", "atlassian-user-role-actor", "admin",
                baseJiraURI.resolve("/jira/secure/useravatar?size=small&ownerId=admin&avatarId=10054")
            ),
            new RoleActor(10020l, "jira-users", "atlassian-group-role-actor", "jira-users",
View Full Code Here

TOP

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

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.