[jboss-svn-commits] JBL Code SVN: r20189 - in labs/jbosstm/trunk/XTS/WS-C: tests/dd and 4 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed May 28 06:16:07 EDT 2008
Author: adinn
Date: 2008-05-28 06:16:07 -0400 (Wed, 28 May 2008)
New Revision: 20189
Added:
labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c11-tests_web-app.xml
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestContextFactory.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestInitialisation.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestRegistrar.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestUtil11.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceExceptionTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationServiceTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestActivationCoordinatorProcessor.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestRegistrationCoordinatorProcessor.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestSuite.java
Modified:
labs/jbosstm/trunk/XTS/WS-C/build.xml
labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c-tests_application.xml
Log:
added unit tests for 1.1 activation/registration services
Modified: labs/jbosstm/trunk/XTS/WS-C/build.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/build.xml 2008-05-28 10:05:20 UTC (rev 20188)
+++ labs/jbosstm/trunk/XTS/WS-C/build.xml 2008-05-28 10:16:07 UTC (rev 20189)
@@ -285,6 +285,7 @@
<classpath>
<pathelement path="${build.dev.lib.dir}/ws-c.jar"/>
<pathelement path="${build.dev.lib.dir}/ws-c10.jar"/>
+ <pathelement path="${build.dev.lib.dir}/ws-c11.jar"/>
<path refid="tests.lib.path"/>
<path refid="lib.ext.path"/>
</classpath>
@@ -299,22 +300,37 @@
<filter token="port" value="${port}"/>
</filterset>
</copy>
+ <copy file="${tests.dd.dir}/ws-c11-tests_web-app.xml" tofile="${build.tests.dd.dir}/web-app11.xml">
+ <filterset>
+ <filter token="hostname" value="${hostname}"/>
+ <filter token="port" value="${port}"/>
+ </filterset>
+ </copy>
<war warfile="${build.tests.webapps.dir}/ws-c-tests.war" webxml="${build.tests.dd.dir}/web-app.xml">
<manifest>
<attribute name="Class-Path" value="ws-c10.jar ws-c.jar ${tests.libs}"/>
</manifest>
<classes dir="${build.tests.classes.dir}"/>
</war>
+ <war warfile="${build.tests.webapps.dir}/ws-c11-tests.war" webxml="${build.tests.dd.dir}/web-app11.xml">
+ <manifest>
+ <attribute name="Class-Path" value="ws-c10.jar ws-c.jar ${tests.libs}"/>
+ </manifest>
+ <classes dir="${build.tests.classes.dir}"/>
+ </war>
<ear earfile="${build.tests.webapps.dir}/ws-c-tests.ear" appxml="${tests.dd.dir}/ws-c-tests_application.xml">
<!--
<fileset dir="${com.arjuna.jta.install.ext}" includes="${jta.ext.jars}"/>
-->
+ <!--
<fileset dir="${com.arjuna.xts.ext}" includes="${tests.libs}"/>
+ -->
<!--
<fileset dir="${com.arjuna.jta.install.lib}" includes="${jta.lib.jars}"/>
<fileset dir="${build.dev.lib.dir}" includes="ws-c10.jar ws-c.jar"/>
-->
<fileset dir="${build.tests.webapps.dir}" includes="ws-c-tests.war"/>
+ <fileset dir="${build.tests.webapps.dir}" includes="ws-c11-tests.war"/>
</ear>
</target>
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c-tests_application.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c-tests_application.xml 2008-05-28 10:05:20 UTC (rev 20188)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c-tests_application.xml 2008-05-28 10:16:07 UTC (rev 20189)
@@ -32,4 +32,11 @@
<context-root>/ws-c-tests</context-root>
</web>
</module>
+
+ <module>
+ <web>
+ <web-uri>ws-c11-tests.war</web-uri>
+ <context-root>/ws-c11-tests</context-root>
+ </web>
+ </module>
</application>
Copied: labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c11-tests_web-app.xml (from rev 20019, labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c-tests_web-app.xml)
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c11-tests_web-app.xml (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c11-tests_web-app.xml 2008-05-28 10:16:07 UTC (rev 20189)
@@ -0,0 +1,53 @@
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
+ of individual contributors.
+ This copyrighted material is made available to anyone wishing to use,
+ modify, copy, or redistribute it subject to the terms and conditions
+ of the GNU General Public License, v. 2.0.
+ This program is distributed in the hope that it will be useful, but WITHOUT A
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ You should have received a copy of the GNU General Public License,
+ v. 2.0 along with this distribution; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+
+ (C) 2005-2006,
+ @author JBoss Inc.
+-->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
+
+<web-app>
+ <display-name>Arjuna Web Services Coordination Tests</display-name>
+
+ <description>Arjuna Web Services Coordination Tests</description>
+
+ <!-- Initialise the tests -->
+ <listener>
+ <listener-class>com.arjuna.wsc11.tests.TestInitialisation</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>JUnit Tests Servlet</servlet-name>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerServlet</servlet-class>
+ <init-param>
+ <param-name>TestSuiteClassName</param-name>
+ <param-value>com.arjuna.wsc11.tests.junit.TestSuite</param-value>
+ </init-param>
+ <load-on-startup>4</load-on-startup>
+ </servlet>
+
+ <!-- servlet mappings -->
+ <servlet-mapping>
+ <servlet-name>JUnit Tests Servlet</servlet-name>
+ <url-pattern>/index.html</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+</web-app>
Copied: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestContextFactory.java (from rev 19937, labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/TestContextFactory.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestContextFactory.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestContextFactory.java 2008-05-28 10:16:07 UTC (rev 20189)
@@ -0,0 +1,107 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * TestContextFactory.java
+ */
+
+package com.arjuna.wsc11.tests;
+
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.wsc11.ContextFactory;
+import com.arjuna.wsc.InvalidCreateParametersException;
+import com.arjuna.wsc.tests.TestUtil;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.Expires;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+
+public class TestContextFactory implements ContextFactory
+{
+ public TestContextFactory(String coordinationType)
+ {
+ _identifier = 0;
+ _coordinationType = coordinationType;
+ }
+
+ public void install(final String coordinationTypeURI)
+ {
+ }
+
+ public CoordinationContext create(final String coordinationTypeURI,
+ final Long expires, final CoordinationContextType currentContext)
+ throws InvalidCreateParametersException
+ {
+ if (coordinationTypeURI.equals(TestUtil.INVALID_CREATE_PARAMETERS_COORDINATION_TYPE)) {
+ throw new InvalidCreateParametersException();
+ }
+
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ final String registrationURI = serviceRegistry.getServiceURI(CoordinationConstants.REGISTRATION_SERVICE_NAME) ;
+ final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder.serviceName(CoordinationConstants.REGISTRATION_SERVICE_QNAME);
+ builder.endpointName(CoordinationConstants.REGISTRATION_ENDPOINT_QNAME);
+ builder.address(registrationURI);
+ W3CEndpointReference registrationService = builder.build();
+
+ CoordinationContext testCoordinationContext = new CoordinationContext();
+ CoordinationContext.Identifier identifier = new CoordinationContext.Identifier();
+ identifier.setValue(Integer.toString(nextIdentifier()));
+ testCoordinationContext.setIdentifier(identifier);
+ if (expires != null && expires.longValue() > 0) {
+ Expires expiresInstance = new Expires();
+ expiresInstance.setValue(expires);
+ testCoordinationContext.setExpires(expiresInstance);
+ }
+ testCoordinationContext.setCoordinationType(_coordinationType) ;
+ testCoordinationContext.setRegistrationService(registrationService) ;
+
+ try {
+ SOAPFactory factory = SOAPFactory.newInstance();
+ SOAPElement element = factory.createElement(TestUtil.TEST_ELEMENT_EXTENSION_VALUE_QNAME);
+ SOAPElement textElement = element.addTextNode(TestUtil.TEST_EXTENSION_VALUE);
+ testCoordinationContext.getAny().add(element);
+ } catch (SOAPException e) {
+ // TODO log error here
+ }
+
+ return testCoordinationContext;
+ }
+
+ public void uninstall(final String coordinationTypeURI)
+ {
+ }
+
+ private synchronized int nextIdentifier()
+ {
+ return _identifier++ ;
+ }
+
+ private int _identifier = 0;
+ private String _coordinationType = null;
+}
\ No newline at end of file
Copied: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestInitialisation.java (from rev 19937, labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/TestInitialisation.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestInitialisation.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestInitialisation.java 2008-05-28 10:16:07 UTC (rev 20189)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wsc11.tests;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.wsc11.ContextFactoryMapper;
+import com.arjuna.wsc11.RegistrarMapper;
+import com.arjuna.wsc11.tests.TestContextFactory;
+import com.arjuna.wsc.tests.TestUtil;
+import com.arjuna.wsc11.tests.TestRegistrar;
+
+/**
+ * Initialise the test.
+ * @author kevin
+ */
+public class TestInitialisation implements ServletContextListener
+{
+ /**
+ * The context has been initialized.
+ * @param servletContextEvent The servlet context event.
+ */
+ public void contextInitialized(final ServletContextEvent servletContextEvent)
+ {
+ final ContextFactoryMapper contextFactoryMapper = ContextFactoryMapper.getFactory() ;
+ final TestContextFactory testContextFactory = new TestContextFactory(TestUtil.COORDINATION_TYPE) ;
+
+ contextFactoryMapper.addContextFactory(TestUtil.COORDINATION_TYPE, testContextFactory) ;
+ contextFactoryMapper.addContextFactory(TestUtil.INVALID_CREATE_PARAMETERS_COORDINATION_TYPE, testContextFactory) ;
+
+ final RegistrarMapper registrarMapper = RegistrarMapper.getFactory() ;
+ final TestRegistrar testRegistrar = new TestRegistrar() ;
+
+ registrarMapper.addRegistrar(TestUtil.PROTOCOL_IDENTIFIER, testRegistrar) ;
+ registrarMapper.addRegistrar(TestUtil.ALREADY_REGISTERED_PROTOCOL_IDENTIFIER, testRegistrar) ;
+ registrarMapper.addRegistrar(TestUtil.INVALID_PROTOCOL_PROTOCOL_IDENTIFIER, testRegistrar) ;
+ registrarMapper.addRegistrar(TestUtil.INVALID_STATE_PROTOCOL_IDENTIFIER, testRegistrar) ;
+ registrarMapper.addRegistrar(TestUtil.NO_ACTIVITY_PROTOCOL_IDENTIFIER, testRegistrar) ;
+ }
+
+ /**
+ * The context is about to be destroyed.
+ * @param servletContextEvent The servlet context event.
+ */
+ public void contextDestroyed(final ServletContextEvent servletContextEvent)
+ {
+ final ContextFactoryMapper contextFactoryMapper = ContextFactoryMapper.getFactory() ;
+ contextFactoryMapper.removeContextFactory(TestUtil.COORDINATION_TYPE);
+ contextFactoryMapper.removeContextFactory(TestUtil.INVALID_CREATE_PARAMETERS_COORDINATION_TYPE);
+
+ final RegistrarMapper registrarMapper = RegistrarMapper.getFactory() ;
+ registrarMapper.removeRegistrar(TestUtil.PROTOCOL_IDENTIFIER);
+ registrarMapper.removeRegistrar(TestUtil.ALREADY_REGISTERED_PROTOCOL_IDENTIFIER);
+ registrarMapper.removeRegistrar(TestUtil.INVALID_PROTOCOL_PROTOCOL_IDENTIFIER);
+ registrarMapper.removeRegistrar(TestUtil.INVALID_STATE_PROTOCOL_IDENTIFIER);
+ registrarMapper.removeRegistrar(TestUtil.NO_ACTIVITY_PROTOCOL_IDENTIFIER);
+ }
+}
\ No newline at end of file
Copied: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestRegistrar.java (from rev 19937, labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/TestRegistrar.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestRegistrar.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestRegistrar.java 2008-05-28 10:16:07 UTC (rev 20189)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * TestRegistrar.java
+ */
+
+package com.arjuna.wsc11.tests;
+
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wsc.InvalidProtocolException;
+import com.arjuna.wsc.InvalidStateException;
+import com.arjuna.wsc.NoActivityException;
+import com.arjuna.wsc11.Registrar;
+import com.arjuna.wsc.tests.TestUtil;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+public class TestRegistrar implements Registrar
+{
+ public void install(String protocolIdentifier)
+ {
+ }
+
+ public W3CEndpointReference register(W3CEndpointReference participantProtocolService, String protocolIdentifier, InstanceIdentifier instanceIdentifier)
+ throws AlreadyRegisteredException, InvalidProtocolException, InvalidStateException, NoActivityException
+ {
+ if (protocolIdentifier.equals(TestUtil.ALREADY_REGISTERED_PROTOCOL_IDENTIFIER))
+ throw new AlreadyRegisteredException();
+ else if (protocolIdentifier.equals(TestUtil.INVALID_PROTOCOL_PROTOCOL_IDENTIFIER))
+ throw new InvalidProtocolException();
+ else if (protocolIdentifier.equals(TestUtil.INVALID_STATE_PROTOCOL_IDENTIFIER))
+ throw new InvalidStateException();
+ else if (protocolIdentifier.equals(TestUtil.NO_ACTIVITY_PROTOCOL_IDENTIFIER))
+ throw new NoActivityException();
+
+ return TestUtil11.getProtocolCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier());
+ }
+
+ public void uninstall(String protocolIdentifier)
+ {
+ }
+}
\ No newline at end of file
Copied: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestUtil11.java (from rev 19937, labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/TestUtil.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestUtil11.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/TestUtil11.java 2008-05-28 10:16:07 UTC (rev 20189)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * TestUtil.java
+ */
+
+package com.arjuna.wsc11.tests;
+
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.wsc.tests.TestUtil;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
+public class TestUtil11
+{
+ final private static String TAG = "wsc";
+ final private static String NAMESPACE = "http://wsc.example.org/";
+ final private static String PROTOCOL_PARTICIPANT_ENDPOINT_NAME ="ProtocolParticipantEndpoint";
+ final private static String PROTOCOL_PARTICIPANT_SERVICE_NAME ="ProtocolParticipantService";
+ final private static String PROTOCOL_COORDINATOR_ENDPOINT_NAME ="ProtocolCoordinatorEndpoint";
+ final private static String PROTOCOL_COORDINATOR_SERVICE_NAME ="ProtocolCoordinatorService";
+
+ final public static String activationCoordinatorService = "http://localhost:8080/ws-c11/ActivationService";
+ final public static String registrationCoordinatorService = "http://localhost:8080/ws-c11/RegistrationService";
+
+ final public static QName PROTOCOL_PARTICIPANT_SERVICE_QNAME = new QName(NAMESPACE, PROTOCOL_PARTICIPANT_SERVICE_NAME, TAG);
+ final public static QName PROTOCOL_PARTICIPANT_ENDPOINT_QNAME = new QName(NAMESPACE, PROTOCOL_PARTICIPANT_ENDPOINT_NAME, TAG);
+ final public static QName PROTOCOL_COORDINATOR_SERVICE_QNAME = new QName(NAMESPACE, PROTOCOL_COORDINATOR_SERVICE_NAME, TAG);
+ final public static QName PROTOCOL_COORDINATOR_ENDPOINT_QNAME = new QName(NAMESPACE, PROTOCOL_COORDINATOR_ENDPOINT_NAME, TAG);
+
+ public static W3CEndpointReference getActivationEndpoint() {
+ W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder.serviceName(CoordinationConstants.ACTIVATION_SERVICE_QNAME);
+ builder.endpointName(CoordinationConstants.ACTIVATION_ENDPOINT_QNAME);
+ builder.address(activationCoordinatorService);
+ return builder.build();
+ }
+
+ public static W3CEndpointReference getRegistrationEndpoint(String identifier) {
+ W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder.serviceName(CoordinationConstants.REGISTRATION_SERVICE_QNAME);
+ builder.endpointName(CoordinationConstants.REGISTRATION_ENDPOINT_QNAME);
+ builder.address(registrationCoordinatorService);
+ if (identifier != null) {
+ InstanceIdentifier.setEndpointInstanceIdentifier(builder, identifier);
+ }
+ return builder.build();
+ }
+
+ public static W3CEndpointReference getProtocolCoordinatorEndpoint(String identifier) {
+ W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder.serviceName(PROTOCOL_COORDINATOR_SERVICE_QNAME);
+ builder.endpointName(PROTOCOL_COORDINATOR_ENDPOINT_QNAME);
+ builder.address(TestUtil.PROTOCOL_COORDINATOR_SERVICE);
+ if (identifier != null) {
+ InstanceIdentifier.setEndpointInstanceIdentifier(builder, identifier);
+ }
+ return builder.build();
+ }
+
+ public static W3CEndpointReference getProtocolParticipantEndpoint(String identifier) {
+ W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder.serviceName(PROTOCOL_PARTICIPANT_SERVICE_QNAME);
+ builder.endpointName(PROTOCOL_PARTICIPANT_ENDPOINT_QNAME);
+ builder.address(TestUtil.PROTOCOL_PARTICIPANT_SERVICE);
+ if (identifier != null) {
+ InstanceIdentifier.setEndpointInstanceIdentifier(builder, identifier);
+ }
+ return builder.build();
+ }
+}
\ No newline at end of file
Copied: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceExceptionTestCase.java (from rev 19937, labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationServiceExceptionTestCase.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceExceptionTestCase.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceExceptionTestCase.java 2008-05-28 10:16:07 UTC (rev 20189)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * ActivationServiceExceptionTestCase.java
+ */
+
+package com.arjuna.wsc11.tests.junit;
+
+import junit.framework.TestCase;
+
+import com.arjuna.wsc11.ActivationCoordinator;
+import com.arjuna.wsc.InvalidCreateParametersException;
+import com.arjuna.wsc.tests.TestUtil;
+import com.arjuna.wsc11.tests.TestUtil11;
+
+public class ActivationServiceExceptionTestCase extends TestCase
+{
+ public void testInvalidCreateParametersException()
+ throws Exception
+ {
+ final String messageID = "testInvalidCreateParametersException" ;
+ final String coordinationTypeURI = TestUtil.INVALID_CREATE_PARAMETERS_COORDINATION_TYPE ;
+ try
+ {
+ ActivationCoordinator.createCoordinationContext(TestUtil11.activationCoordinatorService, messageID, coordinationTypeURI, null, null) ;
+ fail("Expected exception: InvalidCreateParametersException");
+ }
+ catch (final InvalidCreateParametersException icpe) {} // Ignore, expected
+ catch (final Throwable th)
+ {
+ fail("Expected exception: InvalidCreateParametersException");
+ }
+ }
+}
\ No newline at end of file
Copied: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceTestCase.java (from rev 19937, labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationServiceTestCase.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceTestCase.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceTestCase.java 2008-05-28 10:16:07 UTC (rev 20189)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * ActivationServiceTestCase.java
+ */
+
+package com.arjuna.wsc11.tests.junit;
+
+import junit.framework.TestCase;
+
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.wsc11.ActivationCoordinator;
+import com.arjuna.wsc.InvalidCreateParametersException;
+import com.arjuna.wsc.tests.TestUtil;
+import com.arjuna.wsc11.tests.TestUtil11;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+public class ActivationServiceTestCase extends TestCase
+{
+ public void testKnownCoordinationType()
+ throws Exception
+ {
+ final String messageID = "testKnownCoordinationType" ;
+ final String coordinationTypeURI = TestUtil.COORDINATION_TYPE ;
+
+ try
+ {
+ final CoordinationContextType coordinationContext = ActivationCoordinator.createCoordinationContext(TestUtil11.activationCoordinatorService, messageID, coordinationTypeURI, null, null) ;
+
+ assertNotNull(coordinationContext);
+ assertNotNull(coordinationContext.getCoordinationType()) ;
+ assertEquals(TestUtil.COORDINATION_TYPE, coordinationContext.getCoordinationType());
+ assertNotNull(coordinationContext.getRegistrationService()) ;
+ }
+ catch (final Throwable th)
+ {
+ fail("Unexpected exception: " + th);
+ }
+ }
+
+ public void testUnknownCoordinationType()
+ throws Exception
+ {
+ final String messageID = "testUnknownCoordinationType" ;
+ final String coordinationTypeURI = TestUtil.UNKNOWN_COORDINATION_TYPE ;
+ try
+ {
+ final CoordinationContextType coordinationContext = ActivationCoordinator.createCoordinationContext(TestUtil11.activationCoordinatorService, messageID, coordinationTypeURI, null, null) ;
+ fail("Expected exception: InvalidCreateParametersException");
+ }
+ catch (final InvalidCreateParametersException icpe) {} // Ignore, expected
+ catch (final Throwable th)
+ {
+ fail("Expected exception: InvalidCreateParametersException");
+ }
+ }
+}
\ No newline at end of file
Copied: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationTestCase.java (from rev 20019, labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationTestCase.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationTestCase.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationTestCase.java 2008-05-28 10:16:07 UTC (rev 20189)
@@ -0,0 +1,252 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * ActivationTestCase.java
+ */
+
+package com.arjuna.wsc11.tests.junit;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.addressing.AddressingProperties;
+
+import junit.framework.TestCase;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.webservices11.SoapFault11;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.wscoor.client.ActivationCoordinatorClient;
+import com.arjuna.webservices11.wscoor.processors.ActivationCoordinatorProcessor;
+import com.arjuna.wsc.tests.TestUtil;
+import com.arjuna.wsc11.tests.junit.TestActivationCoordinatorProcessor.CreateCoordinationContextDetails;
+import com.arjuna.wsc11.tests.junit.TestActivationCoordinatorProcessor;
+import com.arjuna.wsc11.tests.TestUtil11;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.*;
+import org.omg.CosNaming.NamingContextExtPackage.AddressHelper;
+
+public class ActivationTestCase extends TestCase
+{
+ private ActivationCoordinatorProcessor origActivationCoordinatorProcessor ;
+
+ private TestActivationCoordinatorProcessor testActivationCoordinatorProcessor = new TestActivationCoordinatorProcessor() ;
+
+ protected void setUp()
+ throws Exception
+ {
+ origActivationCoordinatorProcessor = ActivationCoordinatorProcessor.setCoordinator(testActivationCoordinatorProcessor) ;
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ }
+
+ 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) ;
+ }
+
+ public void testRequestWithExpiresWithoutCurrentContext()
+ throws Exception
+ {
+ final String messageId = "testRequestWithExpiresWithoutCurrentContext" ;
+ final String coordinationType = TestUtil.COORDINATION_TYPE ;
+ final Long expires = new Long(123456L) ;
+ final CoordinationContext coordinationContext = null ;
+
+ executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
+ }
+
+ public void testRequestWithoutExpiresWithCurrentContextWithoutExpires()
+ throws Exception
+ {
+ final String messageId = "testRequestWithoutExpiresWithCurrentContextWithoutExpires" ;
+ 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) ;
+ W3CEndpointReference registrationService = TestUtil11.getRegistrationEndpoint(identifier.getValue());
+ coordinationContext.setRegistrationService(registrationService) ;
+
+ executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
+ }
+
+ 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) ;
+ }
+
+ 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) ;
+ }
+
+ 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) ;
+ }
+
+ private void executeRequestTest(final String messageId, final String coordinationType, final Long expires, final CoordinationContext coordinationContext)
+ throws Exception
+ {
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(TestUtil11.activationCoordinatorService, messageId) ;
+ Expires expiresInstance;
+ if (expires == null) {
+ expiresInstance = null;
+ } else {
+ expiresInstance = new Expires();
+ expiresInstance.setValue(expires.longValue());
+ }
+ CreateCoordinationContextResponseType createCoordinationContextResponseType;
+
+ createCoordinationContextResponseType =
+ ActivationCoordinatorClient.getClient().sendCreateCoordination(addressingProperties, coordinationType, expiresInstance, coordinationContext) ;
+
+ final CreateCoordinationContextDetails details = testActivationCoordinatorProcessor.getCreateCoordinationContextDetails(messageId, 10000) ;
+ final CreateCoordinationContextType requestCreateCoordinationContext = details.getCreateCoordinationContext() ;
+ final AddressingProperties requestAddressingProperties = details.getAddressingProperties() ;
+
+ assertNotNull(requestAddressingProperties.getTo());
+ assertEquals(requestAddressingProperties.getTo().getURI().toString(), TestUtil11.activationCoordinatorService);
+ // we don't care about the reply to field -- this is an RPC style message
+ // assertNotNull(requestAddressingProperties.getReplyTo());
+ // assertTrue(AddressingHelper.isNoneReplyTo(requestAddressingProperties));
+ assertNotNull(requestAddressingProperties.getMessageID());
+ assertEquals(requestAddressingProperties.getMessageID().getURI().toString(), messageId);
+
+ if (expires == null)
+ {
+ assertNull(requestCreateCoordinationContext.getExpires()) ;
+ }
+ else
+ {
+ assertNotNull(requestCreateCoordinationContext.getExpires()) ;
+ assertEquals(expires.longValue(), requestCreateCoordinationContext.getExpires().getValue());
+ }
+ if (coordinationContext == null)
+ {
+ assertNull(requestCreateCoordinationContext.getCurrentContext()) ;
+ }
+ else
+ {
+ assertNotNull(requestCreateCoordinationContext.getCurrentContext()) ;
+ assertEquals(requestCreateCoordinationContext.getCurrentContext().getIdentifier().getValue(),
+ coordinationContext.getIdentifier().getValue()) ;
+ if (coordinationContext.getExpires() == null)
+ {
+ assertNull(requestCreateCoordinationContext.getCurrentContext().getExpires()) ;
+ }
+ else
+ {
+ assertNotNull(requestCreateCoordinationContext.getCurrentContext().getExpires()) ;
+ assertEquals(requestCreateCoordinationContext.getCurrentContext().getExpires().getValue(),
+ coordinationContext.getExpires().getValue()) ;
+ }
+ assertNotNull(requestCreateCoordinationContext.getCurrentContext().getIdentifier());
+ assertEquals(requestCreateCoordinationContext.getCurrentContext().getIdentifier().getValue(),
+ coordinationContext.getIdentifier().getValue()) ;
+ }
+ assertNotNull(requestCreateCoordinationContext.getCoordinationType());
+ assertEquals(requestCreateCoordinationContext.getCoordinationType(), coordinationType);
+
+ // make sure we got a sensible response
+
+ checkResponse(coordinationType, expiresInstance, createCoordinationContextResponseType);
+ }
+
+ 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());
+ }
+
+ protected void tearDown()
+ throws Exception
+ {
+ ActivationCoordinatorProcessor.setCoordinator(origActivationCoordinatorProcessor) ;
+ origActivationCoordinatorProcessor = null ;
+ testActivationCoordinatorProcessor = null ;
+ }
+}
\ No newline at end of file
Copied: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationServiceTestCase.java (from rev 19937, labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/RegistrationServiceTestCase.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationServiceTestCase.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationServiceTestCase.java 2008-05-28 10:16:07 UTC (rev 20189)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * RegistrationServiceTestCase.java
+ */
+
+package com.arjuna.wsc11.tests.junit;
+
+import junit.framework.TestCase;
+
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.wsc.InvalidProtocolException;
+import com.arjuna.wsc11.RegistrationCoordinator;
+import com.arjuna.wsc11.tests.TestUtil11;
+import com.arjuna.wsc.tests.TestUtil;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+public class RegistrationServiceTestCase extends TestCase
+{
+ public void testKnownCoordinationType()
+ throws Exception
+ {
+ final String messageId = "testKnownCoordinationType" ;
+ final String protocolIdentifier = TestUtil.PROTOCOL_IDENTIFIER ;
+ final CoordinationContextType coordinationContext = new CoordinationContextType() ;
+ CoordinationContextType.Identifier identifierInstance = new CoordinationContextType.Identifier();
+ coordinationContext.setCoordinationType(TestUtil.COORDINATION_TYPE) ;
+ coordinationContext.setIdentifier(identifierInstance) ;
+ identifierInstance.setValue("identifier");
+ coordinationContext.setRegistrationService(TestUtil11.getRegistrationEndpoint(identifierInstance.getValue())) ;
+ W3CEndpointReference participantEndpoint = TestUtil11.getProtocolParticipantEndpoint("participant");
+ try
+ {
+ final W3CEndpointReference registerResponse = RegistrationCoordinator.register(coordinationContext, messageId, participantEndpoint, protocolIdentifier) ;
+
+ assertNotNull(registerResponse) ;
+ }
+ catch (final Throwable th)
+ {
+ fail("Unexpected exception: " + th) ;
+ }
+ }
+
+ public void testUnknownCoordinationType()
+ throws Exception
+ {
+ final String messageId = "testUnknownCoordinationType" ;
+ final String protocolIdentifier = TestUtil.UNKNOWN_PROTOCOL_IDENTIFIER ;
+ final CoordinationContextType coordinationContext = new CoordinationContextType() ;
+ CoordinationContextType.Identifier identifierInstance = new CoordinationContextType.Identifier();
+ coordinationContext.setCoordinationType(TestUtil.COORDINATION_TYPE) ;
+ coordinationContext.setIdentifier(identifierInstance) ;
+ identifierInstance.setValue("identifier");
+ coordinationContext.setRegistrationService(TestUtil11.getRegistrationEndpoint(identifierInstance.getValue())) ;
+ W3CEndpointReference participantEndpoint = TestUtil11.getProtocolParticipantEndpoint("participant");
+ try
+ {
+ RegistrationCoordinator.register(coordinationContext, messageId, participantEndpoint, protocolIdentifier) ;
+ }
+ catch (final InvalidProtocolException ipe) {}
+ catch (final Throwable th)
+ {
+ fail("Unexpected exception: " + th) ;
+ }
+ }
+}
\ No newline at end of file
Copied: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationTestCase.java (from rev 20019, labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/RegistrationTestCase.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationTestCase.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationTestCase.java 2008-05-28 10:16:07 UTC (rev 20189)
@@ -0,0 +1,121 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * RegistrationTestCase.java
+ */
+
+package com.arjuna.wsc11.tests.junit;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.addressing.AddressingProperties;
+
+import junit.framework.TestCase;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.wscoor.client.WSCOORClient;
+import com.arjuna.webservices11.wscoor.processors.RegistrationCoordinatorProcessor;
+import com.arjuna.wsc11.tests.junit.TestRegistrationCoordinatorProcessor.RegisterDetails;
+import com.arjuna.wsc11.tests.junit.TestRegistrationCoordinatorProcessor;
+import com.arjuna.wsc11.tests.TestUtil11;
+import com.arjuna.wsc11.RegistrationCoordinator;
+import com.arjuna.wsc11.messaging.MessageId;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterResponseType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegistrationPortType;
+
+public class RegistrationTestCase extends TestCase
+{
+ private RegistrationCoordinatorProcessor origRegistrationCoordinatorProcessor ;
+
+ private TestRegistrationCoordinatorProcessor testRegistrationCoordinatorProcessor = new TestRegistrationCoordinatorProcessor() ;
+
+ protected void setUp()
+ throws Exception
+ {
+ origRegistrationCoordinatorProcessor = RegistrationCoordinatorProcessor.setCoordinator(testRegistrationCoordinatorProcessor) ;
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ }
+
+ public void testRequestWithoutInstanceIdentifier()
+ throws Exception
+ {
+ executeRequest("testRequestWithoutInstanceIdentifier", null) ;
+ }
+
+ public void testRequestWithInstanceIdentifier()
+ throws Exception
+ {
+ executeRequest("testRequestWithInstanceIdentifier", new InstanceIdentifier("identifier")) ;
+ }
+
+ private void executeRequest(final String messageId, final InstanceIdentifier instanceIdentifier)
+ throws Exception
+ {
+ final String protocolIdentifier = "http://foo.example.org/bar" ;
+ final W3CEndpointReference participantProtocolEndpoint = TestUtil11.getProtocolParticipantEndpoint("participant");
+ String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null);
+ W3CEndpointReference registerEndpoint = TestUtil11.getRegistrationEndpoint(identifier);
+ RegisterType registerType = new RegisterType();
+ RegisterResponseType response;
+
+ registerType.setProtocolIdentifier(protocolIdentifier);
+ registerType.setParticipantProtocolService(participantProtocolEndpoint);
+ RegistrationPortType port = WSCOORClient.getRegistrationPort(registerEndpoint, CoordinationConstants.WSCOOR_ACTION_REGISTER, messageId);
+ response = port.registerOperation(registerType);
+
+ final RegisterDetails details = testRegistrationCoordinatorProcessor.getRegisterDetails(messageId, 10000) ;
+ final RegisterType requestRegister = details.getRegister() ;
+ final AddressingProperties requestAddressingProperties = details.getAddressingProperties() ;
+ final ArjunaContext requestArjunaContext = details.getArjunaContext() ;
+
+ assertEquals(requestAddressingProperties.getTo().getURI().toString(), TestUtil11.registrationCoordinatorService);
+ assertEquals(requestAddressingProperties.getMessageID().getURI().toString(), messageId);
+
+ if (instanceIdentifier == null)
+ {
+ assertNull(requestArjunaContext) ;
+ }
+ else
+ {
+ assertEquals(instanceIdentifier.getInstanceIdentifier(), requestArjunaContext.getInstanceIdentifier().getInstanceIdentifier()) ;
+ }
+
+ assertEquals(protocolIdentifier, requestRegister.getProtocolIdentifier()) ;
+ }
+
+ protected void tearDown()
+ throws Exception
+ {
+ RegistrationCoordinatorProcessor.setCoordinator(origRegistrationCoordinatorProcessor) ;
+ origRegistrationCoordinatorProcessor = null ;
+ testRegistrationCoordinatorProcessor = null ;
+ }
+}
\ No newline at end of file
Copied: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestActivationCoordinatorProcessor.java (from rev 19937, labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/TestActivationCoordinatorProcessor.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestActivationCoordinatorProcessor.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestActivationCoordinatorProcessor.java 2008-05-28 10:16:07 UTC (rev 20189)
@@ -0,0 +1,139 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wsc11.tests.junit;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.arjuna.webservices11.wscoor.processors.ActivationCoordinatorProcessor;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.wsc.tests.TestUtil;
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wsc.InvalidProtocolException;
+import com.arjuna.wsc.InvalidStateException;
+import com.arjuna.wsc.NoActivityException;
+import com.arjuna.wsc11.tests.TestRegistrar;
+import com.arjuna.wsc11.tests.TestUtil11;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CreateCoordinationContextType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CreateCoordinationContextResponseType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
+public class TestActivationCoordinatorProcessor extends
+ ActivationCoordinatorProcessor
+{
+ private Map messageIdMap = new HashMap() ;
+
+ public CreateCoordinationContextResponseType createCoordinationContext(final CreateCoordinationContextType createCoordinationContext,
+ final AddressingProperties addressingProperties)
+ {
+ final String messageId = addressingProperties.getMessageID().getURI().toString() ;
+ synchronized(messageIdMap)
+ {
+ messageIdMap.put(messageId, new CreateCoordinationContextDetails(createCoordinationContext, addressingProperties)) ;
+ messageIdMap.notifyAll() ;
+ }
+ // we have to return a value so lets cook one up
+
+ CreateCoordinationContextResponseType createCoordinationContextResponseType = new CreateCoordinationContextResponseType();
+ CoordinationContext coordinationContext = new CoordinationContext();
+ coordinationContext.setCoordinationType(createCoordinationContext.getCoordinationType());
+ coordinationContext.setExpires(createCoordinationContext.getExpires());
+ String identifier = nextIdentifier();
+ CoordinationContextType.Identifier identifierInstance = new CoordinationContextType.Identifier();
+ identifierInstance.setValue(identifier);
+ coordinationContext.setIdentifier(identifierInstance);
+ W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder.serviceName(CoordinationConstants.REGISTRATION_SERVICE_QNAME);
+ builder.endpointName(CoordinationConstants.REGISTRATION_ENDPOINT_QNAME);
+ builder.address(TestUtil.PROTOCOL_COORDINATOR_SERVICE);
+ W3CEndpointReference registrationService = builder.build();
+ coordinationContext.setRegistrationService(TestUtil11.getRegistrationEndpoint(identifier));
+ createCoordinationContextResponseType.setCoordinationContext(coordinationContext);
+
+ return createCoordinationContextResponseType;
+ }
+
+ public CreateCoordinationContextDetails getCreateCoordinationContextDetails(final String messageId, long timeout)
+ {
+ final long endTime = System.currentTimeMillis() + timeout ;
+ synchronized(messageIdMap)
+ {
+ long now = System.currentTimeMillis() ;
+ while(now < endTime)
+ {
+ final CreateCoordinationContextDetails details = (CreateCoordinationContextDetails)messageIdMap.remove(messageId) ;
+ if (details != null)
+ {
+ return details ;
+ }
+ try
+ {
+ messageIdMap.wait(endTime - now) ;
+ }
+ catch (final InterruptedException ie) {} // ignore
+ now = System.currentTimeMillis() ;
+ }
+ final CreateCoordinationContextDetails details = (CreateCoordinationContextDetails)messageIdMap.remove(messageId) ;
+ if (details != null)
+ {
+ return details ;
+ }
+ }
+ throw new NullPointerException("Timeout occurred waiting for id: " + messageId) ;
+ }
+
+ public static class CreateCoordinationContextDetails
+ {
+ private final CreateCoordinationContextType createCoordinationContext ;
+ private final AddressingProperties addressingProperties ;
+
+ CreateCoordinationContextDetails(final CreateCoordinationContextType createCoordinationContext,
+ final AddressingProperties addressingProperties)
+ {
+ this.createCoordinationContext = createCoordinationContext ;
+ this.addressingProperties = addressingProperties ;
+ }
+
+ public CreateCoordinationContextType getCreateCoordinationContext()
+ {
+ return createCoordinationContext ;
+ }
+
+ public AddressingProperties getAddressingProperties()
+ {
+ return addressingProperties ;
+ }
+ }
+
+ private static int nextIdentifier = 0;
+
+ private synchronized String nextIdentifier()
+ {
+ int value = nextIdentifier++;
+
+ return Integer.toString(value);
+ }
+}
\ No newline at end of file
Copied: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestRegistrationCoordinatorProcessor.java (from rev 19937, labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/TestRegistrationCoordinatorProcessor.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestRegistrationCoordinatorProcessor.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestRegistrationCoordinatorProcessor.java 2008-05-28 10:16:07 UTC (rev 20189)
@@ -0,0 +1,119 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wsc11.tests.junit;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wscoor.processors.RegistrationCoordinatorProcessor;
+import com.arjuna.wsc11.tests.TestUtil11;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterResponseType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+public class TestRegistrationCoordinatorProcessor extends
+ RegistrationCoordinatorProcessor
+{
+ private Map messageIdMap = new HashMap() ;
+
+ public RegisterResponseType register(final RegisterType register, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+ {
+ final String messageId = addressingProperties.getMessageID().getURI().toString() ;
+ synchronized(messageIdMap)
+ {
+ messageIdMap.put(messageId, new RegisterDetails(register, addressingProperties, arjunaContext)) ;
+ messageIdMap.notifyAll() ;
+ }
+
+ // we need to cook up a response here
+ RegisterResponseType registerResponseType = new RegisterResponseType();
+ if (arjunaContext != null) {
+ InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
+ registerResponseType.setCoordinatorProtocolService(TestUtil11.getProtocolCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier()));
+ } else {
+ registerResponseType.setCoordinatorProtocolService(TestUtil11.getProtocolCoordinatorEndpoint(null));
+ }
+ return registerResponseType;
+ }
+
+ public RegisterDetails getRegisterDetails(final String messageId, final long timeout)
+ {
+ final long endTime = System.currentTimeMillis() + timeout ;
+ synchronized(messageIdMap)
+ {
+ long now = System.currentTimeMillis() ;
+ while(now < endTime)
+ {
+ final RegisterDetails details = (RegisterDetails)messageIdMap.remove(messageId) ;
+ if (details != null)
+ {
+ return details ;
+ }
+ try
+ {
+ messageIdMap.wait(endTime - now) ;
+ }
+ catch (final InterruptedException ie) {} // ignore
+ now = System.currentTimeMillis() ;
+ }
+ final RegisterDetails details = (RegisterDetails)messageIdMap.remove(messageId) ;
+ if (details != null)
+ {
+ return details ;
+ }
+ }
+ throw new NullPointerException("Timeout occurred waiting for id: " + messageId) ;
+ }
+
+ public static class RegisterDetails
+ {
+ private final RegisterType register ;
+ private final AddressingProperties addressingProperties ;
+ private final ArjunaContext arjunaContext ;
+
+ RegisterDetails(final RegisterType register,
+ final AddressingProperties addressingProperties,
+ final ArjunaContext arjunaContext)
+ {
+ this.register = register ;
+ this.addressingProperties = addressingProperties ;
+ this.arjunaContext = arjunaContext ;
+ }
+
+ public RegisterType getRegister()
+ {
+ return register ;
+ }
+
+ public AddressingProperties getAddressingProperties()
+ {
+ return addressingProperties ;
+ }
+
+ public ArjunaContext getArjunaContext()
+ {
+ return arjunaContext ;
+ }
+ }
+}
\ No newline at end of file
Copied: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestSuite.java (from rev 19937, labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/TestSuite.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestSuite.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestSuite.java 2008-05-28 10:16:07 UTC (rev 20189)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * TestSuite.java
+ */
+
+package com.arjuna.wsc11.tests.junit;
+
+public class TestSuite extends junit.framework.TestSuite
+{
+ public TestSuite()
+ {
+ addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.ActivationTestCase.class));
+ addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.RegistrationTestCase.class));
+
+ addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.ActivationServiceTestCase.class));
+ addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.ActivationServiceExceptionTestCase.class));
+ addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.RegistrationServiceTestCase.class));
+ //addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.RegistrationServiceExceptionTestCase.class));
+
+ //addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.EnduranceTestCase.class));
+ //addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.ThreadedEnduranceTestCase.class));
+ }
+}
\ No newline at end of file
More information about the jboss-svn-commits
mailing list