use of com.arjuna.wst.tests.arq.TestParticipantCompletionParticipantProcessor.ParticipantCompletionParticipantDetails in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionCoordinatorTest method testSendClose.
@Test
public void testSendClose() throws Exception {
final String messageId = "testSendClose";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("1");
W3CEndpointReference endpoint = TestUtil.getParticipantCompletionParticipantEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.participantCompletionParticipantServiceURI, messageId);
ParticipantCompletionParticipantClient.getClient().sendClose(endpoint, map, new InstanceIdentifier("sender"));
final ParticipantCompletionParticipantDetails details = testParticipantCompletionParticipantProcessor.getParticipantCompletionParticipantDetails(messageId, 10000);
assertTrue(details.hasClose());
checkDetails(details, true, true, messageId, instanceIdentifier);
}
use of com.arjuna.wst.tests.arq.TestParticipantCompletionParticipantProcessor.ParticipantCompletionParticipantDetails in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionCoordinatorTest method testSendGetStatus.
@Test
public void testSendGetStatus() throws Exception {
final String messageId = "testSendGetStatus";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("7");
W3CEndpointReference endpoint = TestUtil.getParticipantCompletionParticipantEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.participantCompletionParticipantServiceURI, messageId);
ParticipantCompletionParticipantClient.getClient().sendGetStatus(endpoint, map, new InstanceIdentifier("sender"));
final ParticipantCompletionParticipantDetails details = testParticipantCompletionParticipantProcessor.getParticipantCompletionParticipantDetails(messageId, 10000);
assertTrue(details.hasGetStatus());
checkDetails(details, true, true, messageId, instanceIdentifier);
}
use of com.arjuna.wst.tests.arq.TestParticipantCompletionParticipantProcessor.ParticipantCompletionParticipantDetails in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionCoordinatorTest method testSendNotCompleted.
@Test
public void testSendNotCompleted() throws Exception {
final String messageId = "testSendNotCompleted";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("9");
W3CEndpointReference endpoint = TestUtil.getParticipantCompletionParticipantEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.participantCompletionParticipantServiceURI, messageId);
ParticipantCompletionParticipantClient.getClient().sendNotCompleted(endpoint, map, new InstanceIdentifier("sender"));
;
final ParticipantCompletionParticipantDetails details = testParticipantCompletionParticipantProcessor.getParticipantCompletionParticipantDetails(messageId, 10000);
assertTrue(details.hasNotCompleted());
checkDetails(details, false, true, messageId, instanceIdentifier);
}
use of com.arjuna.wst.tests.arq.TestParticipantCompletionParticipantProcessor.ParticipantCompletionParticipantDetails in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionCoordinatorTest method testSendFaulted.
@Test
public void testSendFaulted() throws Exception {
final String messageId = "testSendFaulted";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("4");
W3CEndpointReference endpoint = TestUtil.getParticipantCompletionParticipantEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.participantCompletionParticipantServiceURI, messageId);
ParticipantCompletionParticipantClient.getClient().sendFailed(endpoint, map, new InstanceIdentifier("sender"));
final ParticipantCompletionParticipantDetails details = testParticipantCompletionParticipantProcessor.getParticipantCompletionParticipantDetails(messageId, 10000);
assertTrue(details.hasFaulted());
checkDetails(details, false, true, messageId, instanceIdentifier);
}
Aggregations