use of cz.metacentrum.perun.audit.events.StringMessageEvent in project perun by CESNET.
the class AuditMessagesManagerEntryIntegrationTest method getMessagesPage_oneOfMany.
@Test
public void getMessagesPage_oneOfMany() throws Exception {
System.out.println(CLASS_NAME + "getMessagesPage_oneOfMany");
perun.getAuditer().logWithoutTransaction(sess, new StringMessageEvent("Test older"));
perun.getAuditer().logWithoutTransaction(sess, new StringMessageEvent("Test newer"));
MessagesPageQuery query = new MessagesPageQuery(1, 0, SortingOrder.DESCENDING);
Paginated<AuditMessage> messages = perun.getAuditMessagesManager().getMessagesPage(sess, query);
assertThat(messages.getData().size()).isEqualTo(1);
assertThat(messages.getData().get(0).getEvent().getMessage()).isEqualTo("Test newer");
}
Aggregations