Search in sources :

Example 1 with TestBranchingService

use of com.adaptris.core.stubs.TestBranchingService in project interlok by adaptris.

the class BranchingServiceCollectionTest method setUp.

@Before
public void setUp() throws Exception {
    branchService = new TestBranchingService();
    branchService.setUniqueId(FIRST_SERVICE_ID);
    lowService = new AddMetadataService();
    lowService.setUniqueId(BRANCH_LOW);
    lowService.addMetadataElement("service-id", BRANCH_LOW);
    highService = new AddMetadataService();
    highService.setUniqueId(BRANCH_HIGH);
    highService.addMetadataElement("service-id", BRANCH_HIGH);
    openMocks = MockitoAnnotations.openMocks(this);
}
Also used : TestBranchingService(com.adaptris.core.stubs.TestBranchingService) AddMetadataService(com.adaptris.core.services.metadata.AddMetadataService) Before(org.junit.Before)

Example 2 with TestBranchingService

use of com.adaptris.core.stubs.TestBranchingService in project interlok by adaptris.

the class BranchingServiceEnablerTest method testService_WrapBranching.

@Test
public void testService_WrapBranching() throws Exception {
    AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage("ABC");
    BranchingServiceEnabler s = wrap(new TestBranchingService());
    execute(s, msg);
    assertEquals("001", msg.getNextServiceId());
}
Also used : AdaptrisMessage(com.adaptris.core.AdaptrisMessage) TestBranchingService(com.adaptris.core.stubs.TestBranchingService) Test(org.junit.Test)

Aggregations

TestBranchingService (com.adaptris.core.stubs.TestBranchingService)2 AdaptrisMessage (com.adaptris.core.AdaptrisMessage)1 AddMetadataService (com.adaptris.core.services.metadata.AddMetadataService)1 Before (org.junit.Before)1 Test (org.junit.Test)1