Search in sources :

Example 21 with BootstrapProperties

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

the class SharedServiceConfigurationCheckerTest method testServiceConnectionDoesNotExist.

@Test
public void testServiceConnectionDoesNotExist() throws Exception {
    BootstrapProperties mockBootProperties = new MockBootProperties(createAdapterConfig(new NullService("SharedNullConnection"), new SharedService("DoesNotExist")));
    ConfigurationCheckReport report = checker.performConfigCheck(mockBootProperties);
    assertFalse(report.isCheckPassed());
    assertTrue(report.getFailureExceptions().size() > 0);
    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 22 with BootstrapProperties

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

the class SharedServiceConfigurationCheckerTest method testSharedNotUsed.

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

Example 23 with BootstrapProperties

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

the class DeprecatedConfigurationCheckerTest method testPerformCheck_Valid.

@Test
public void testPerformCheck_Valid() throws Exception {
    DeprecatedConfigurationChecker checker = new DeprecatedConfigurationChecker();
    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 24 with BootstrapProperties

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

the class DeserializationConfigurationCheckerTest method testUnmarshallFailureBadXml.

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

Example 25 with BootstrapProperties

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

the class DeserializationConfigurationCheckerTest method testUnmarshallSuccess.

@Test
public void testUnmarshallSuccess() throws Exception {
    BootstrapProperties mockBootProperties = new MockBootProperties(createAdapterConfig());
    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