use of com.adaptris.core.management.BootstrapProperties in project interlok by adaptris.
the class CachingConfigLoaderTest method testLoad_NoKey.
@Test
public void testLoad_NoKey() throws Exception {
BootstrapProperties mockBootProperties = new MockBootProperties("some-data");
assertEquals("some-data", CachingConfigLoader.loadInterlokConfig(mockBootProperties));
}
use of com.adaptris.core.management.BootstrapProperties in project interlok by adaptris.
the class CachingConfigLoaderTest method testLoad_WithKey.
@Test
public void testLoad_WithKey() throws Exception {
BootstrapProperties mockBootProperties = new MockBootProperties("some-data", Arrays.asList("adapterResourceName"));
assertEquals("some-data", CachingConfigLoader.loadInterlokConfig(mockBootProperties));
assertEquals(1, CachingConfigLoader.cacheSize());
assertEquals("some-data", CachingConfigLoader.loadInterlokConfig(mockBootProperties));
}
use of com.adaptris.core.management.BootstrapProperties in project interlok by adaptris.
the class ConfigurationCheckRunnerTest method testSuccessRunner.
@Test
@SuppressWarnings("deprecation")
public void testSuccessRunner() throws Exception {
String xml = this.createAdapterConfig(new NullConnection("SharedNullConnection"), new SharedConnection("SharedNullConnection"), new SharedConnection("SharedNullConnection"));
BootstrapProperties mockProp = new MockBootProperties(xml);
List<ConfigurationCheckReport> reports = checkRunner.runChecks(mockProp, mockUnifiedBootstrap);
assertEquals(configurationCheckersCount(), reports.size());
for (ConfigurationCheckReport report : reports) {
if (report.getCheckName().equals(SHARED_CONN_TEST_FRIENDLY_NAME)) {
assertTrue(report.isCheckPassed());
assertEquals(0, report.getFailureExceptions().size());
}
}
}
use of com.adaptris.core.management.BootstrapProperties in project interlok by adaptris.
the class ConfigurationCheckRunnerTest method testFailureRunner.
@Test
@SuppressWarnings("deprecation")
public void testFailureRunner() throws Exception {
String xml = this.createAdapterConfig(new NullConnection("SharedNullConnection"), null, null);
BootstrapProperties mockProp = new MockBootProperties(xml);
List<ConfigurationCheckReport> reports = checkRunner.runChecks(mockProp, mockUnifiedBootstrap);
assertEquals(configurationCheckersCount(), reports.size());
for (ConfigurationCheckReport report : reports) {
if (report.getCheckName().equals(SHARED_CONN_TEST_FRIENDLY_NAME)) {
assertFalse(report.isCheckPassed());
assertTrue(report.getWarnings().size() > 0);
assertNotNull(report.toString());
}
}
}
use of com.adaptris.core.management.BootstrapProperties in project interlok by adaptris.
the class SharedConnectionConfigurationCheckerTest method testProduceAndConsumeConnectionsExist.
@Test
public void testProduceAndConsumeConnectionsExist() throws Exception {
BootstrapProperties mockBootProperties = new MockBootProperties(createAdapterConfig(new NullConnection("SharedNullConnection"), new SharedConnection("SharedNullConnection"), new SharedConnection("SharedNullConnection"), null));
ConfigurationCheckReport report = checker.performConfigCheck(mockBootProperties);
assertTrue(report.isCheckPassed());
assertNotNull(report.toString());
}
Aggregations