Search in sources :

Example 11 with BootstrapProperties

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

the class SharedServiceConfigurationCheckerTest 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 12 with BootstrapProperties

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

the class SharedServiceConfigurationCheckerTest method testServiceExist.

@Test
public void testServiceExist() throws Exception {
    BootstrapProperties mockBootProperties = new MockBootProperties(createAdapterConfig(new NullService("SharedNullService"), 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) NullService(com.adaptris.core.NullService) Test(org.junit.Test)

Example 13 with BootstrapProperties

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

the class SharedServiceConfigurationCheckerTest method testServiceInServiceCollectionExist.

@Test
public void testServiceInServiceCollectionExist() throws Exception {
    BootstrapProperties mockBootProperties = new MockBootProperties(createAdapterConfig(new NullService("SharedNullService"), new ServiceList(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) NullService(com.adaptris.core.NullService) Test(org.junit.Test)

Example 14 with BootstrapProperties

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

the class ConfigPreProcessorImplTest method testProperties.

@Test
public void testProperties() {
    BootstrapProperties props = new JunitBootstrapProperties(new Properties());
    DummyConfigurationPreProcessor p = new DummyConfigurationPreProcessor(props);
    p.setProperties(new Properties());
    assertNotNull(p.getProperties());
}
Also used : JunitBootstrapProperties(com.adaptris.core.stubs.JunitBootstrapProperties) BootstrapProperties(com.adaptris.core.management.BootstrapProperties) JunitBootstrapProperties(com.adaptris.core.stubs.JunitBootstrapProperties) Properties(java.util.Properties) JunitBootstrapProperties(com.adaptris.core.stubs.JunitBootstrapProperties) BootstrapProperties(com.adaptris.core.management.BootstrapProperties) Test(org.junit.Test)

Example 15 with BootstrapProperties

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

the class ConfigPreProcessorImplTest method testConfiguration.

@Test
@SuppressWarnings("deprecation")
public void testConfiguration() {
    BootstrapProperties props = new JunitBootstrapProperties(new Properties());
    DummyConfigurationPreProcessor p = new DummyConfigurationPreProcessor(props);
    assertNotSame(props, p.getBootstrapProperties());
    assertNotNull(p.getConfiguration());
    assertEquals(0, p.getConfiguration().size());
}
Also used : JunitBootstrapProperties(com.adaptris.core.stubs.JunitBootstrapProperties) BootstrapProperties(com.adaptris.core.management.BootstrapProperties) JunitBootstrapProperties(com.adaptris.core.stubs.JunitBootstrapProperties) Properties(java.util.Properties) JunitBootstrapProperties(com.adaptris.core.stubs.JunitBootstrapProperties) 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