use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext in project narayana by jbosstm.
the class ActivationTest method checkResponse.
public void checkResponse(final String coordinationType, final Expires expiresInstance, final CreateCoordinationContextResponseType createCoordinationContextResponseType) throws Exception {
CoordinationContext outContext = createCoordinationContextResponseType.getCoordinationContext();
assertNotNull(outContext);
assertEquals(coordinationType, outContext.getCoordinationType());
if (expiresInstance != null) {
assertNotNull(outContext.getExpires());
assertEquals(expiresInstance.getValue(), outContext.getExpires().getValue());
} else {
assertNull(outContext.getExpires());
}
assertNotNull(outContext.getRegistrationService());
}
use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext in project narayana by jbosstm.
the class ActivationTest method testRequestWithoutExpiresWithoutCurrentContext.
@Test
public void testRequestWithoutExpiresWithoutCurrentContext() throws Exception {
final String messageId = "testRequestWithoutExpiresWithoutCurrentContext";
final String coordinationType = TestUtil.COORDINATION_TYPE;
final Long expires = null;
final CoordinationContext coordinationContext = null;
executeRequestTest(messageId, coordinationType, expires, coordinationContext);
}
use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext in project narayana by jbosstm.
the class ActivationTest method testRequestWithExpiresWithCurrentContextWithoutExpires.
@Test
public void testRequestWithExpiresWithCurrentContextWithoutExpires() throws Exception {
final String messageId = "testRequestWithExpiresWithCurrentContextWithoutExpires";
final String coordinationType = TestUtil.COORDINATION_TYPE;
final Long expires = new Long(123456L);
final CoordinationContext coordinationContext = new CoordinationContext();
coordinationContext.setCoordinationType(coordinationType);
CoordinationContextType.Identifier identifier = new CoordinationContextType.Identifier();
identifier.setValue(TestUtil.PROTOCOL_IDENTIFIER);
coordinationContext.setIdentifier(identifier);
W3CEndpointReference registrationService = TestUtil11.getRegistrationEndpoint(identifier.getValue());
coordinationContext.setRegistrationService(registrationService);
executeRequestTest(messageId, coordinationType, expires, coordinationContext);
}
use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext in project narayana by jbosstm.
the class ActivationTest method testRequestWithoutExpiresWithCurrentContextWithExpires.
@Test
public void testRequestWithoutExpiresWithCurrentContextWithExpires() throws Exception {
final String messageId = "testRequestWithoutExpiresWithCurrentContextWithExpires";
final String coordinationType = TestUtil.COORDINATION_TYPE;
final Long expires = null;
final CoordinationContext coordinationContext = new CoordinationContext();
coordinationContext.setCoordinationType(coordinationType);
CoordinationContextType.Identifier identifier = new CoordinationContextType.Identifier();
identifier.setValue(TestUtil.PROTOCOL_IDENTIFIER);
coordinationContext.setIdentifier(identifier);
Expires expiresInstance = new Expires();
expiresInstance.setValue(123456L);
coordinationContext.setExpires(expiresInstance);
W3CEndpointReference registrationService = TestUtil11.getRegistrationEndpoint(identifier.getValue());
coordinationContext.setRegistrationService(registrationService);
executeRequestTest(messageId, coordinationType, expires, coordinationContext);
}
use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext in project narayana by jbosstm.
the class ActivationTest method testRequestWithExpiresWithCurrentContextWithExpires.
@Test
public void testRequestWithExpiresWithCurrentContextWithExpires() throws Exception {
final String messageId = "testRequestWithExpiresWithCurrentContextWithExpires";
final String coordinationType = TestUtil.COORDINATION_TYPE;
final Long expires = new Long(123456L);
final CoordinationContext coordinationContext = new CoordinationContext();
coordinationContext.setCoordinationType(coordinationType);
CoordinationContextType.Identifier identifier = new CoordinationContextType.Identifier();
identifier.setValue(TestUtil.PROTOCOL_IDENTIFIER);
coordinationContext.setIdentifier(identifier);
Expires expiresInstance = new Expires();
expiresInstance.setValue(1234567L);
coordinationContext.setExpires(expiresInstance);
W3CEndpointReference registrationService = TestUtil11.getRegistrationEndpoint(identifier.getValue());
coordinationContext.setRegistrationService(registrationService);
executeRequestTest(messageId, coordinationType, expires, coordinationContext);
}
Aggregations