use of com.adaptris.core.stubs.ExampleBranchingService in project interlok by adaptris.
the class StatelessServiceWrapperTest method testWrappingWrappedSettersAreCalled.
@Test
public void testWrappingWrappedSettersAreCalled() throws Exception {
ExampleBranchingService ws = new ExampleBranchingService();
ws.setUniqueId(ExampleBranchingService.class.getSimpleName());
StatelessServiceWrapper s = new StatelessServiceWrapper(ws);
s.setUniqueId(StatelessServiceWrapper.class.getSimpleName());
s.setContinueOnFail(true);
s.setIsTrackingEndpoint(true);
assertNotNull(ws.getIsTrackingEndpoint());
assertEquals(s.getIsTrackingEndpoint(), ws.getIsTrackingEndpoint());
assertEquals(ws.isTrackingEndpoint(), s.isTrackingEndpoint());
}
use of com.adaptris.core.stubs.ExampleBranchingService in project interlok by adaptris.
the class StatelessServiceWrapperTest method testWrapping.
@Test
public void testWrapping() throws Exception {
ExampleBranchingService ws = new ExampleBranchingService();
ws.setUniqueId(ExampleBranchingService.class.getSimpleName());
ws.setContinueOnFail(true);
ws.setIsTrackingEndpoint(true);
StatelessServiceWrapper s = new StatelessServiceWrapper(ws);
s.setUniqueId(StatelessServiceWrapper.class.getSimpleName());
assertNotNull(ws.getIsTrackingEndpoint());
assertEquals(ws.isTrackingEndpoint(), s.isTrackingEndpoint());
assertEquals(ws.isBranching(), s.isBranching());
assertEquals(ws.createName(), s.createName());
assertEquals(ws.createQualifier(), s.createQualifier());
assertNotSame(ws.getUniqueId(), s.getUniqueId());
ws.setUniqueId("");
assertEquals(StatelessServiceWrapper.class.getSimpleName(), s.createQualifier());
assertNotNull(s.wrappedServices());
assertEquals(1, s.wrappedServices().length);
}
use of com.adaptris.core.stubs.ExampleBranchingService in project interlok by adaptris.
the class BranchingServiceCollectionTest method retrieveObjectForSampleConfig.
@Override
protected Object retrieveObjectForSampleConfig() {
BranchingServiceCollection services = createServiceCollection();
services.setFirstServiceId(FIRST_SERVICE_ID);
services.addService(lowService);
services.addService(highService);
ExampleBranchingService branching = new ExampleBranchingService();
branching.setUniqueId(FIRST_SERVICE_ID);
branching.setHigherServiceId(BRANCH_HIGH);
branching.setLowerServiceId(BRANCH_LOW);
services.addService(branching);
return services;
}
Aggregations