Search in sources :

Example 1 with MockAuditDao

use of org.killbill.billing.util.audit.dao.MockAuditDao in project killbill by killbill.

the class TestUtilModuleNoDB method installAuditMock.

private void installAuditMock() {
    bind(AuditDao.class).toInstance(new MockAuditDao());
    bind(AuditUserApi.class).to(DefaultAuditUserApi.class).asEagerSingleton();
}
Also used : AuditDao(org.killbill.billing.util.audit.dao.AuditDao) MockAuditDao(org.killbill.billing.util.audit.dao.MockAuditDao) MockAuditDao(org.killbill.billing.util.audit.dao.MockAuditDao) DefaultAuditUserApi(org.killbill.billing.util.audit.api.DefaultAuditUserApi)

Example 2 with MockAuditDao

use of org.killbill.billing.util.audit.dao.MockAuditDao in project killbill by killbill.

the class TestDefaultAuditUserApi method beforeClass.

@Override
@BeforeClass(groups = "fast")
public void beforeClass() throws Exception {
    super.beforeClass();
    auditLogs = ImmutableList.<AuditLog>of(createAuditLog(), createAuditLog(), createAuditLog(), createAuditLog());
    objectIds = ImmutableList.<UUID>of(UUID.randomUUID(), UUID.randomUUID(), UUID.randomUUID(), UUID.randomUUID());
    for (final TableName tableName : TableName.values()) {
        for (final UUID objectId : objectIds) {
            for (final AuditLog auditLog : auditLogs) {
                ((MockAuditDao) auditDao).addAuditLogForId(tableName, objectId, auditLog);
            }
        }
    }
}
Also used : TableName(org.killbill.billing.util.dao.TableName) MockAuditDao(org.killbill.billing.util.audit.dao.MockAuditDao) UUID(java.util.UUID) AuditLog(org.killbill.billing.util.audit.AuditLog) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

MockAuditDao (org.killbill.billing.util.audit.dao.MockAuditDao)2 UUID (java.util.UUID)1 AuditLog (org.killbill.billing.util.audit.AuditLog)1 DefaultAuditUserApi (org.killbill.billing.util.audit.api.DefaultAuditUserApi)1 AuditDao (org.killbill.billing.util.audit.dao.AuditDao)1 TableName (org.killbill.billing.util.dao.TableName)1 BeforeClass (org.testng.annotations.BeforeClass)1