Search in sources :

Example 6 with SPIAuditorProvider

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

the class SPIAuditorProviderTest method testCreateSingleAuditorFromSPI_NullConstructor_AssertMutliProviderAuditorCreated.

@Test
public void testCreateSingleAuditorFromSPI_NullConstructor_AssertMutliProviderAuditorCreated() throws Exception {
    setupSPIImplementation(LoggingAuditor.class);
    setupSPIImplementation(NoOpAuditor.class);
    SPIAuditorProvider prov = new SPIAuditorProvider(null);
    assertTrue(prov.isImplementationAvailable());
    assertNotNull(prov.get());
    assertTrue(prov.get() instanceof MultiProviderAuditor);
}
Also used : MultiProviderAuditor(org.nhindirect.common.audit.impl.MultiProviderAuditor) SPIAuditorProvider(org.nhindirect.common.audit.provider.SPIAuditorProvider) Test(org.junit.Test)

Aggregations

SPIAuditorProvider (org.nhindirect.common.audit.provider.SPIAuditorProvider)6 Test (org.junit.Test)5 MultiProviderAuditor (org.nhindirect.common.audit.impl.MultiProviderAuditor)3 LoggingAuditor (org.nhindirect.common.audit.impl.LoggingAuditor)2 Auditor (org.nhindirect.common.audit.Auditor)1 NoOpAuditor (org.nhindirect.common.audit.impl.NoOpAuditor)1 LoggingAuditorProvider (org.nhindirect.common.audit.provider.LoggingAuditorProvider)1