Search in sources :

Example 1 with NoOpAuditorProvider

use of org.nhindirect.common.audit.provider.NoOpAuditorProvider in project nhin-d by DirectProject.

the class MultiProviderAuditorProviderTest method testCreateProviderFromAuditorcollection.

@SuppressWarnings("unchecked")
@Test
public void testCreateProviderFromAuditorcollection() {
    Provider<Auditor>[] provs = new Provider[2];
    provs[0] = new NoOpAuditorProvider();
    provs[1] = new LoggingAuditorProvider();
    MultiProviderAuditorProvider provider = new MultiProviderAuditorProvider(provs);
    assertNotNull(provider);
    assertNotNull(provider.get());
    assertTrue(provider.get() instanceof MultiProviderAuditor);
}
Also used : LoggingAuditorProvider(org.nhindirect.common.audit.provider.LoggingAuditorProvider) MultiProviderAuditorProvider(org.nhindirect.common.audit.provider.MultiProviderAuditorProvider) MultiProviderAuditor(org.nhindirect.common.audit.impl.MultiProviderAuditor) NoOpAuditorProvider(org.nhindirect.common.audit.provider.NoOpAuditorProvider) LoggingAuditorProvider(org.nhindirect.common.audit.provider.LoggingAuditorProvider) Provider(com.google.inject.Provider) NoOpAuditorProvider(org.nhindirect.common.audit.provider.NoOpAuditorProvider) MultiProviderAuditorProvider(org.nhindirect.common.audit.provider.MultiProviderAuditorProvider) Test(org.junit.Test)

Aggregations

Provider (com.google.inject.Provider)1 Test (org.junit.Test)1 MultiProviderAuditor (org.nhindirect.common.audit.impl.MultiProviderAuditor)1 LoggingAuditorProvider (org.nhindirect.common.audit.provider.LoggingAuditorProvider)1 MultiProviderAuditorProvider (org.nhindirect.common.audit.provider.MultiProviderAuditorProvider)1 NoOpAuditorProvider (org.nhindirect.common.audit.provider.NoOpAuditorProvider)1