Search in sources :

Example 1 with ExampleBranchingService

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());
}
Also used : ExampleBranchingService(com.adaptris.core.stubs.ExampleBranchingService) Test(org.junit.Test)

Example 2 with ExampleBranchingService

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);
}
Also used : ExampleBranchingService(com.adaptris.core.stubs.ExampleBranchingService) Test(org.junit.Test)

Example 3 with ExampleBranchingService

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;
}
Also used : ExampleBranchingService(com.adaptris.core.stubs.ExampleBranchingService)

Aggregations

ExampleBranchingService (com.adaptris.core.stubs.ExampleBranchingService)3 Test (org.junit.Test)2