use of com.adaptris.core.ServiceCollection in project interlok by adaptris.
the class ExampleChannelCase method createServiceCollection.
private ServiceCollection createServiceCollection() throws CoreException {
ServiceCollection services = new ServiceList();
AddMetadataService service = new AddMetadataService();
service.addMetadataElement("key1", "val1");
services.addService(service);
services.addService(new LogMessageService());
return services;
}
use of com.adaptris.core.ServiceCollection in project interlok by adaptris.
the class ExampleWorkflowCase method testSetServiceCollection.
@Test
public void testSetServiceCollection() throws Exception {
WorkflowImp wf = createWorkflowForGenericTests();
ServiceCollection obj = wf.getServiceCollection();
try {
wf.setServiceCollection(null);
fail();
} catch (IllegalArgumentException e) {
}
assertEquals(obj, wf.getServiceCollection());
}
use of com.adaptris.core.ServiceCollection in project interlok by adaptris.
the class ServiceUtil method rewriteConnectionsForTesting.
public static Service rewriteConnectionsForTesting(Service service) throws CoreException {
Service rewritten = service;
if (rewritten instanceof ConnectedService) {
ConnectedService connectedService = (ConnectedService) rewritten;
connectedService.setConnection(cloneForTesting(connectedService.getConnection()));
}
if (rewritten instanceof ServiceCollection) {
rewriteConnectionsForTesting((ServiceCollection) rewritten);
}
if (rewritten instanceof ServiceWrapper) {
rewriteConnectionsForTesting((ServiceWrapper) rewritten);
}
return rewritten;
}
Aggregations