use of com.arjuna.wst.tests.arq.TestCoordinatorCompletionParticipantProcessor.CoordinatorCompletionParticipantDetails in project narayana by jbosstm.
the class BusinessAgreementWithCoordinatorCompletionCoordinatorTest method testSendComplete.
@Test
public void testSendComplete() throws Exception {
final String messageId = "testSendComplete";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("7");
W3CEndpointReference endpoint = TestUtil.getCoordinatorCompletionParticipantEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.coordinatorCompletionParticipantServiceURI, messageId);
CoordinatorCompletionParticipantClient.getClient().sendComplete(endpoint, map, new InstanceIdentifier("sender"));
final CoordinatorCompletionParticipantDetails details = testCoordinatorCompletionParticipantProcessor.getCoordinatorCompletionParticipantDetails(messageId, 10000);
assertTrue(details.hasComplete());
checkDetails(details, true, true, messageId, instanceIdentifier);
}
use of com.arjuna.wst.tests.arq.TestCoordinatorCompletionParticipantProcessor.CoordinatorCompletionParticipantDetails in project narayana by jbosstm.
the class BusinessAgreementWithCoordinatorCompletionCoordinatorTest method testSendNotCompleted.
@Test
public void testSendNotCompleted() throws Exception {
final String messageId = "testSendNotCompleted";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("10");
W3CEndpointReference endpoint = TestUtil.getCoordinatorCompletionParticipantEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.coordinatorCompletionParticipantServiceURI, messageId);
CoordinatorCompletionParticipantClient.getClient().sendNotCompleted(endpoint, map, new InstanceIdentifier("sender"));
final CoordinatorCompletionParticipantDetails details = testCoordinatorCompletionParticipantProcessor.getCoordinatorCompletionParticipantDetails(messageId, 10000);
assertTrue(details.hasNotCompleted());
checkDetails(details, false, true, messageId, instanceIdentifier);
}
use of com.arjuna.wst.tests.arq.TestCoordinatorCompletionParticipantProcessor.CoordinatorCompletionParticipantDetails in project narayana by jbosstm.
the class BusinessAgreementWithCoordinatorCompletionCoordinatorTest method testSendGetStatus.
@Test
public void testSendGetStatus() throws Exception {
final String messageId = "testSendGetStatus";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("8");
W3CEndpointReference endpoint = TestUtil.getCoordinatorCompletionParticipantEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.coordinatorCompletionParticipantServiceURI, messageId);
CoordinatorCompletionParticipantClient.getClient().sendGetStatus(endpoint, map, new InstanceIdentifier("sender"));
final CoordinatorCompletionParticipantDetails details = testCoordinatorCompletionParticipantProcessor.getCoordinatorCompletionParticipantDetails(messageId, 10000);
assertTrue(details.hasGetStatus());
checkDetails(details, true, true, messageId, instanceIdentifier);
}
use of com.arjuna.wst.tests.arq.TestCoordinatorCompletionParticipantProcessor.CoordinatorCompletionParticipantDetails in project narayana by jbosstm.
the class BusinessAgreementWithCoordinatorCompletionCoordinatorTest method testSendCompensate.
@Test
public void testSendCompensate() throws Exception {
final String messageId = "testSendCompensate";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("3");
W3CEndpointReference endpoint = TestUtil.getCoordinatorCompletionParticipantEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.coordinatorCompletionParticipantServiceURI, messageId);
CoordinatorCompletionParticipantClient.getClient().sendCompensate(endpoint, map, new InstanceIdentifier("sender"));
final CoordinatorCompletionParticipantDetails details = testCoordinatorCompletionParticipantProcessor.getCoordinatorCompletionParticipantDetails(messageId, 10000);
assertTrue(details.hasCompensate());
checkDetails(details, true, true, messageId, instanceIdentifier);
}
use of com.arjuna.wst.tests.arq.TestCoordinatorCompletionParticipantProcessor.CoordinatorCompletionParticipantDetails in project narayana by jbosstm.
the class BusinessAgreementWithCoordinatorCompletionCoordinatorTest method testSendStatus.
@Test
public void testSendStatus() throws Exception {
final String messageId = "testSendStatus";
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("6");
W3CEndpointReference endpoint = TestUtil.getCoordinatorCompletionParticipantEndpoint(instanceIdentifier.getInstanceIdentifier());
final MAP map = AddressingHelper.createRequestContext(TestUtil.coordinatorCompletionParticipantServiceURI, messageId);
final State state = State.STATE_ACTIVE;
CoordinatorCompletionParticipantClient.getClient().sendStatus(endpoint, map, new InstanceIdentifier("sender"), state.getValue());
final CoordinatorCompletionParticipantDetails details = testCoordinatorCompletionParticipantProcessor.getCoordinatorCompletionParticipantDetails(messageId, 10000);
assertNotNull(details.hasStatus());
assertEquals(details.hasStatus().getState(), state.getValue());
checkDetails(details, true, true, messageId, instanceIdentifier);
}
Aggregations