use of com.arjuna.wst.tests.arq.TestParticipantCompletionCoordinatorProcessor.ParticipantCompletionCoordinatorDetails in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionParticipantTest method testSendGetStatus.
@Test
public void testSendGetStatus() throws Exception {
final String messageId = "testSendGetStatus";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("9");
W3CEndpointReference endpoint = TestUtil.getParticipantCompletionCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.participantCompletionCoordinatorServiceURI, messageId);
ParticipantCompletionCoordinatorClient.getClient().sendGetStatus(endpoint, map, new InstanceIdentifier("sender"));
final ParticipantCompletionCoordinatorDetails details = testParticipantCompletionCoordinatorProcessor.getParticipantCompletionCoordinatorDetails(messageId, 10000);
assertTrue(details.hasGetStatus());
checkDetails(details, true, true, messageId, instanceIdentifier);
}
use of com.arjuna.wst.tests.arq.TestParticipantCompletionCoordinatorProcessor.ParticipantCompletionCoordinatorDetails in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionParticipantTest method testSendClosed.
@Test
public void testSendClosed() throws Exception {
final String messageId = "testSendClosed";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("1");
W3CEndpointReference endpoint = TestUtil.getParticipantCompletionCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.participantCompletionCoordinatorServiceURI, messageId);
ParticipantCompletionCoordinatorClient.getClient().sendClosed(endpoint, map, new InstanceIdentifier("sender"));
final ParticipantCompletionCoordinatorDetails details = testParticipantCompletionCoordinatorProcessor.getParticipantCompletionCoordinatorDetails(messageId, 10000);
assertTrue(details.hasClosed());
checkDetails(details, false, true, messageId, instanceIdentifier);
}
use of com.arjuna.wst.tests.arq.TestParticipantCompletionCoordinatorProcessor.ParticipantCompletionCoordinatorDetails in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionParticipantTest method testSendStatus.
@Test
public void testSendStatus() throws Exception {
final String messageId = "testSendStatus";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("5");
W3CEndpointReference endpoint = TestUtil.getParticipantCompletionCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.participantCompletionCoordinatorServiceURI, messageId);
final State state = State.STATE_ENDED;
ParticipantCompletionCoordinatorClient.getClient().sendStatus(endpoint, map, new InstanceIdentifier("sender"), state.getValue());
final ParticipantCompletionCoordinatorDetails details = testParticipantCompletionCoordinatorProcessor.getParticipantCompletionCoordinatorDetails(messageId, 10000);
assertNotNull(details.hasStatus());
;
assertEquals(details.hasStatus().getState(), state.getValue());
checkDetails(details, true, true, messageId, instanceIdentifier);
}
use of com.arjuna.wst.tests.arq.TestParticipantCompletionCoordinatorProcessor.ParticipantCompletionCoordinatorDetails 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.wst.tests.arq.TestParticipantCompletionCoordinatorProcessor.ParticipantCompletionCoordinatorDetails 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);
}
Aggregations