Examples of AuditRecordsData


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

        final Integer offset = json.getInt("offset");
        final Integer limit = json.getInt("limit");
        final Integer total = json.getInt("total");
        final OptionalIterable<AuditRecord> records = JsonParseUtil.parseOptionalJsonArray(json.optJSONArray("records"), singleAuditRecordJsonParser);

        return new AuditRecordsData(offset, limit, total, records);
    }
View Full Code Here

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

    public static final Instant SAMPLE_DATE = new DateTime(1994, 11, 05, 13, 15, 30, 111, DateTimeZone.UTC).toInstant();
    private final AuditRecordsJsonParser parser = new AuditRecordsJsonParser();

    @Test
    public void testParseValidResponse() throws Exception {
        final AuditRecordsData auditRecordsData = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/auditRecord/valid.json"));

        assertThat(auditRecordsData.getOffset(), is(0));
        assertThat(auditRecordsData.getLimit(), is(1000));
        assertThat(auditRecordsData.getTotal(), is(2));

        final Iterator<AuditRecord> recordsIterator = auditRecordsData.getRecords().iterator();
        final AuditRecord firstRecord = recordsIterator.next();
        assertThat(firstRecord.getSummary(), is("User added to group"));
        assertThat(firstRecord.getRemoteAddress(), is("127.0.0.1"));

        assertThat(firstRecord.getCreated().toInstant(), is(SAMPLE_DATE));
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.