Search in sources :

Example 1 with SharedService

use of com.adaptris.core.SharedService 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 2 with SharedService

use of com.adaptris.core.SharedService 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 3 with SharedService

use of com.adaptris.core.SharedService 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 4 with SharedService

use of com.adaptris.core.SharedService 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)

Example 5 with SharedService

use of com.adaptris.core.SharedService 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)

Aggregations

SharedService (com.adaptris.core.SharedService)5 BootstrapProperties (com.adaptris.core.management.BootstrapProperties)5 Test (org.junit.Test)5 NullService (com.adaptris.core.NullService)3 ServiceList (com.adaptris.core.ServiceList)2