Search in sources :

Example 6 with AuditLevel

use of org.killbill.billing.util.api.AuditLevel in project killbill by killbill.

the class TestDefaultAuditDao method testRetrieveAuditsViaHistory.

@Test(groups = "slow")
public void testRetrieveAuditsViaHistory() throws Exception {
    addTag();
    for (final AuditLevel level : AuditLevel.values()) {
        final List<AuditLog> auditLogs = auditDao.getAuditLogsForId(TableName.TAG, tag.getId(), level, internalCallContext);
        verifyAuditLogsForTag(auditLogs, level);
        final AccountAuditLogs accountAuditLogs = auditDao.getAuditLogsForAccountRecordId(level, internalCallContext);
        verifyAuditLogsForTag(accountAuditLogs.getAuditLogs(ObjectType.TAG).getAuditLogs(tag.getId()), level);
        final AccountAuditLogsForObjectType accountAuditLogsForObjectType = auditDao.getAuditLogsForAccountRecordId(TableName.TAG, level, internalCallContext);
        verifyAuditLogsForTag(accountAuditLogsForObjectType.getAuditLogs(tag.getId()), level);
    }
}
Also used : AuditLevel(org.killbill.billing.util.api.AuditLevel) AccountAuditLogsForObjectType(org.killbill.billing.util.audit.AccountAuditLogsForObjectType) AccountAuditLogs(org.killbill.billing.util.audit.AccountAuditLogs) AuditLog(org.killbill.billing.util.audit.AuditLog) Test(org.testng.annotations.Test)

Aggregations

AuditLevel (org.killbill.billing.util.api.AuditLevel)6 AccountTimeline (org.killbill.billing.client.model.AccountTimeline)4 AuditLog (org.killbill.billing.client.model.AuditLog)4 AuditLog (org.killbill.billing.util.audit.AuditLog)2 Test (org.testng.annotations.Test)2 Credit (org.killbill.billing.client.model.Credit)1 InvoicePayment (org.killbill.billing.client.model.InvoicePayment)1 InvoicePaymentTransaction (org.killbill.billing.client.model.InvoicePaymentTransaction)1 PaymentTransaction (org.killbill.billing.client.model.PaymentTransaction)1 AccountAuditLogs (org.killbill.billing.util.audit.AccountAuditLogs)1 AccountAuditLogsForObjectType (org.killbill.billing.util.audit.AccountAuditLogsForObjectType)1 Handle (org.skife.jdbi.v2.Handle)1