Search in sources :

Example 1 with MultiProviderAuditorProvider

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

the class MultiProviderAuditorProviderTest method testCreateProviderFromAuditorArray.

@Test
public void testCreateProviderFromAuditorArray() {
    MultiProviderAuditorProvider provider = new MultiProviderAuditorProvider(new Auditor[] { new NoOpAuditor(), new LoggingAuditor() });
    assertNotNull(provider);
    assertNotNull(provider.get());
    assertTrue(provider.get() instanceof MultiProviderAuditor);
}
Also used : MultiProviderAuditorProvider(org.nhindirect.common.audit.provider.MultiProviderAuditorProvider) MultiProviderAuditor(org.nhindirect.common.audit.impl.MultiProviderAuditor) NoOpAuditor(org.nhindirect.common.audit.impl.NoOpAuditor) LoggingAuditor(org.nhindirect.common.audit.impl.LoggingAuditor) Test(org.junit.Test)

Example 2 with MultiProviderAuditorProvider

use of org.nhindirect.common.audit.provider.MultiProviderAuditorProvider 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

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