Search in sources :

Example 6 with BootstrapProperties

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

the class SharedConnectionConfigurationCheckerTest method testNoConnections.

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

Example 7 with BootstrapProperties

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

the class SharedConnectionConfigurationCheckerTest method testCompleteFailureBadXml.

@Test
public void testCompleteFailureBadXml() throws Exception {
    BootstrapProperties mockBootProperties = new MockBootProperties("bad-data");
    ConfigurationCheckReport report = checker.performConfigCheck(mockBootProperties);
    assertFalse(report.isCheckPassed());
    assertTrue(report.getFailureExceptions().size() > 0);
}
Also used : BootstrapProperties(com.adaptris.core.management.BootstrapProperties) Test(org.junit.Test)

Example 8 with BootstrapProperties

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

the class SharedConnectionConfigurationCheckerTest method testConsumeConnectionNoShared.

@Test
public void testConsumeConnectionNoShared() throws Exception {
    BootstrapProperties mockBootProperties = new MockBootProperties(createAdapterConfig(null, new SharedConnection("DoesNotExist"), null, 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 9 with BootstrapProperties

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

the class SharedConnectionConfigurationCheckerTest method testServiceConnectionDoesNotExist.

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

Example 10 with BootstrapProperties

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

the class SharedServiceConfigurationCheckerTest method testNoService.

@Test
public void testNoService() throws Exception {
    BootstrapProperties mockBootProperties = new MockBootProperties(createAdapterConfig(null, null));
    ConfigurationCheckReport report = checker.performConfigCheck(mockBootProperties);
    assertTrue(report.isCheckPassed());
}
Also used : BootstrapProperties(com.adaptris.core.management.BootstrapProperties) 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