use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionParticipantTest method testSendCancelled.
@Test
public void testSendCancelled() throws Exception {
final String messageId = "testSendCancelled";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("2");
W3CEndpointReference endpoint = TestUtil.getParticipantCompletionCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.participantCompletionCoordinatorServiceURI, messageId);
ParticipantCompletionCoordinatorClient.getClient().sendCancelled(endpoint, map, new InstanceIdentifier("sender"));
;
final ParticipantCompletionCoordinatorDetails details = testParticipantCompletionCoordinatorProcessor.getParticipantCompletionCoordinatorDetails(messageId, 10000);
assertTrue(details.hasCancelled());
checkDetails(details, false, true, messageId, instanceIdentifier);
}
use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionParticipantTest method testSendFault.
@Test
public void testSendFault() throws Exception {
final String messageId = "testSendFault";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("8");
W3CEndpointReference endpoint = TestUtil.getParticipantCompletionCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.participantCompletionCoordinatorServiceURI, messageId);
final State state = State.STATE_FAILING_ACTIVE;
ParticipantCompletionCoordinatorClient.getClient().sendFail(endpoint, map, new InstanceIdentifier("sender"), state.getValue());
;
final ParticipantCompletionCoordinatorDetails details = testParticipantCompletionCoordinatorProcessor.getParticipantCompletionCoordinatorDetails(messageId, 10000);
assertNotNull(details.hasFault());
assertEquals(details.hasFault().getExceptionIdentifier(), state.getValue());
checkDetails(details, true, true, messageId, instanceIdentifier);
}
use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionParticipantTest method testSendCannotComplete.
@Test
public void testSendCannotComplete() throws Exception {
final String messageId = "testSendCannotComplete";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("10");
W3CEndpointReference endpoint = TestUtil.getParticipantCompletionCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.participantCompletionCoordinatorServiceURI, messageId);
ParticipantCompletionCoordinatorClient.getClient().sendCannotComplete(endpoint, map, new InstanceIdentifier("sender"));
final ParticipantCompletionCoordinatorDetails details = testParticipantCompletionCoordinatorProcessor.getParticipantCompletionCoordinatorDetails(messageId, 10000);
assertTrue(details.hasCannotComplete());
checkDetails(details, true, true, messageId, instanceIdentifier);
}
use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionParticipantTest method testSendExit.
@Test
public void testSendExit() throws Exception {
final String messageId = "testSendExit";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("7");
W3CEndpointReference endpoint = TestUtil.getParticipantCompletionCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.participantCompletionCoordinatorServiceURI, messageId);
ParticipantCompletionCoordinatorClient.getClient().sendExit(endpoint, map, new InstanceIdentifier("sender"));
final ParticipantCompletionCoordinatorDetails details = testParticipantCompletionCoordinatorProcessor.getParticipantCompletionCoordinatorDetails(messageId, 10000);
assertTrue(details.hasExit());
checkDetails(details, true, true, messageId, instanceIdentifier);
}
use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.
the class CompletionParticipantTest method testSendCommit.
@Test
public void testSendCommit() throws Exception {
final String messageId = "testSendCommit";
final MAP map = AddressingHelper.createRequestContext(TestUtil.completionCoordinatorServiceURI, messageId);
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("1");
final W3CEndpointReference endpoint = TestUtil.getCompletionCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier());
CompletionCoordinatorClient.getClient().sendCommit(endpoint, map, new InstanceIdentifier("sender"));
final CompletionCoordinatorDetails details = testCompletionCoordinatorProcessor.getCompletionCoordinatorDetails(messageId, 10000);
assertTrue(details.hasCommit());
checkDetails(details, true, true, messageId, instanceIdentifier);
}
Aggregations