Search in sources :

Example 16 with BootstrapProperties

use of com.adaptris.core.management.BootstrapProperties in project interlok by adaptris.

the class JavaxValidationCheckerTest method testPerformCheck_Valid.

@Test
public void testPerformCheck_Valid() throws Exception {
    JavaxValidationChecker checker = new JavaxValidationChecker();
    BootstrapProperties mockBootProperties = new MockBootProperties(toString(createAdapterConfig(true)));
    ConfigurationCheckReport report = checker.performConfigCheck(mockBootProperties);
    assertTrue(report.isCheckPassed());
}
Also used : BootstrapProperties(com.adaptris.core.management.BootstrapProperties) Test(org.junit.Test)

Example 17 with BootstrapProperties

use of com.adaptris.core.management.BootstrapProperties in project interlok by adaptris.

the class SharedConnectionConfigurationCheckerTest method testSharedNotUsed.

@Test
public void testSharedNotUsed() throws Exception {
    BootstrapProperties mockBootProperties = new MockBootProperties(createAdapterConfig(new NullConnection("SharedNullConnection"), null, null, null));
    ConfigurationCheckReport report = checker.performConfigCheck(mockBootProperties);
    assertFalse(report.isCheckPassed());
}
Also used : BootstrapProperties(com.adaptris.core.management.BootstrapProperties) NullConnection(com.adaptris.core.NullConnection) Test(org.junit.Test)

Example 18 with BootstrapProperties

use of com.adaptris.core.management.BootstrapProperties in project interlok by adaptris.

the class SharedConnectionConfigurationCheckerTest method testProduceConnectionNoShared.

@Test
public void testProduceConnectionNoShared() throws Exception {
    BootstrapProperties mockBootProperties = new MockBootProperties(createAdapterConfig(null, null, new SharedConnection("DoesNotExist"), null));
    ConfigurationCheckReport report = checker.performConfigCheck(mockBootProperties);
    assertFalse(report.isCheckPassed());
    assertTrue(report.getFailureExceptions().size() > 0);
}
Also used : SharedConnection(com.adaptris.core.SharedConnection) BootstrapProperties(com.adaptris.core.management.BootstrapProperties) Test(org.junit.Test)

Example 19 with BootstrapProperties

use of com.adaptris.core.management.BootstrapProperties in project interlok by adaptris.

the class SharedServiceConfigurationCheckerTest method testServiceNoShared.

@Test
public void testServiceNoShared() throws Exception {
    BootstrapProperties mockBootProperties = new MockBootProperties(createAdapterConfig(null, new SharedService("DoesNotExist")));
    ConfigurationCheckReport report = checker.performConfigCheck(mockBootProperties);
    assertFalse(report.isCheckPassed());
    assertTrue(report.getFailureExceptions().size() > 0);
}
Also used : SharedService(com.adaptris.core.SharedService) BootstrapProperties(com.adaptris.core.management.BootstrapProperties) Test(org.junit.Test)

Example 20 with BootstrapProperties

use of com.adaptris.core.management.BootstrapProperties in project interlok by adaptris.

the class SharedServiceConfigurationCheckerTest method testServiceCollectionExist.

@Test
public void testServiceCollectionExist() throws Exception {
    ServiceList sharedComponent = new ServiceList();
    sharedComponent.setUniqueId("SharedNullService");
    BootstrapProperties mockBootProperties = new MockBootProperties(createAdapterConfig(sharedComponent, new SharedService("SharedNullService")));
    ConfigurationCheckReport report = checker.performConfigCheck(mockBootProperties);
    assertTrue(report.isCheckPassed());
    assertNotNull(report.toString());
}
Also used : SharedService(com.adaptris.core.SharedService) BootstrapProperties(com.adaptris.core.management.BootstrapProperties) ServiceList(com.adaptris.core.ServiceList) Test(org.junit.Test)

Aggregations

BootstrapProperties (com.adaptris.core.management.BootstrapProperties)26 Test (org.junit.Test)25 NullConnection (com.adaptris.core.NullConnection)5 SharedConnection (com.adaptris.core.SharedConnection)5 SharedService (com.adaptris.core.SharedService)5 NullService (com.adaptris.core.NullService)4 Properties (java.util.Properties)3 ServiceList (com.adaptris.core.ServiceList)2 JunitBootstrapProperties (com.adaptris.core.stubs.JunitBootstrapProperties)2