Examples of SecurityLevel


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

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

    assertThat(fieldsInfo.get("security").getAllowedValues(), IsIterableContainingInAnyOrder.<Object>containsInAnyOrder(
        new SecurityLevel(URI.create("http://localhost:2990/jira/rest/api/2/securitylevel/10000"), 10000L,
            "internal", "For internals only"),
        new SecurityLevel(URI.create("http://localhost:2990/jira/rest/api/2/securitylevel/10001"), 10001L,
            "public", "For everyone")
    ));
  }
View Full Code Here

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

  public SecurityLevel parse(final JSONObject json) throws JSONException {
    final URI self = JsonParseUtil.getSelfUri(json);
    final long id = json.getLong("id");
    final String description = json.getString("description");
    final String name = json.getString("name");
    return new SecurityLevel(self, id, name, description);
  }
View Full Code Here

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

public class SecurityLevelJsonParserTest {

  @Test
  public void testParse() throws JSONException {
    final SecurityLevelJsonParser parser = new SecurityLevelJsonParser();
    final SecurityLevel securityLevel = parser.parse(getJsonObjectFromResource("/json/securitylevel/valid.json"));

    assertThat(securityLevel.getSelf(), equalTo(URI.create("http://localhost:2990/jira/rest/api/2/securitylevel/10000")));
    assertThat(securityLevel.getName(), equalTo("Name of security level"));
    assertThat(securityLevel.getDescription(), equalTo("Description of this security level"));
    assertThat(securityLevel.getId(), equalTo(10000L));
  }
View Full Code Here

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

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

    assertThat(fieldsInfo.get("security").getAllowedValues(), IsIterableContainingInAnyOrder.<Object>containsInAnyOrder(
        new SecurityLevel(URI.create("http://localhost:2990/jira/rest/api/2/securitylevel/10000"), 10000L,
            "internal", "For internals only"),
        new SecurityLevel(URI.create("http://localhost:2990/jira/rest/api/2/securitylevel/10001"), 10001L,
            "public", "For everyone")
    ));
  }
View Full Code Here

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

  public SecurityLevel parse(JSONObject json) throws JSONException {
    final String name = json.getString("name");
        final String description = json.getString("description");
        final Long id = JsonParseUtil.getOptionalLong(json, "id");
    final URI selfUri = JsonParseUtil.getSelfUri(json);
    return new SecurityLevel(selfUri, id, name, description);
  }
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.