You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by th...@apache.org on 2005/09/11 15:22:39 UTC
svn commit: r280128 - in
/webservices/kandula/trunk/java/test/org/apache/kandula:
coordinator/CoordinatorImplTest.java integration/
integration/CreateCoordinationContextTest.java
Author: thilina
Date: Sun Sep 11 06:22:03 2005
New Revision: 280128
URL: http://svn.apache.org/viewcvs?rev=280128&view=rev
Log:
adding new integration test
Added:
webservices/kandula/trunk/java/test/org/apache/kandula/integration/
webservices/kandula/trunk/java/test/org/apache/kandula/integration/CreateCoordinationContextTest.java
Modified:
webservices/kandula/trunk/java/test/org/apache/kandula/coordinator/CoordinatorImplTest.java
Modified: webservices/kandula/trunk/java/test/org/apache/kandula/coordinator/CoordinatorImplTest.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/test/org/apache/kandula/coordinator/CoordinatorImplTest.java?rev=280128&r1=280127&r2=280128&view=diff
==============================================================================
--- webservices/kandula/trunk/java/test/org/apache/kandula/coordinator/CoordinatorImplTest.java (original)
+++ webservices/kandula/trunk/java/test/org/apache/kandula/coordinator/CoordinatorImplTest.java Sun Sep 11 06:22:03 2005
@@ -16,6 +16,7 @@
*/
package org.apache.kandula.coordinator;
+import junit.framework.TestCase;
import org.apache.kandula.Constants;
import org.apache.kandula.KandulaException;
import org.apache.kandula.Status;
@@ -23,8 +24,6 @@
import org.apache.kandula.coordinator.context.at.ATActivityContext;
import org.apache.kandula.typemapping.CoordinationContext;
import org.xmlsoap.schemas.ws.x2003.x09.wscoor.CoordinationContextType;
-
-import junit.framework.TestCase;
/**
* @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
Added: webservices/kandula/trunk/java/test/org/apache/kandula/integration/CreateCoordinationContextTest.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/test/org/apache/kandula/integration/CreateCoordinationContextTest.java?rev=280128&view=auto
==============================================================================
--- webservices/kandula/trunk/java/test/org/apache/kandula/integration/CreateCoordinationContextTest.java (added)
+++ webservices/kandula/trunk/java/test/org/apache/kandula/integration/CreateCoordinationContextTest.java Sun Sep 11 06:22:03 2005
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kandula.integration;
+
+/**
+ * @author <a href="mailto:thilina@opensource.lk">Thilina Gunarathne </a>
+ */
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.transport.http.SimpleHTTPServer;
+import org.apache.kandula.Constants;
+import org.apache.kandula.participant.standalone.TransactionManager;
+
+public class CreateCoordinationContextTest extends TestCase {
+
+ private String repository = "test-resources/testing-repository";
+
+ private SimpleHTTPServer server;
+
+ private boolean finish = false;
+
+
+ public CreateCoordinationContextTest() {
+ super(CreateCoordinationContextTest.class.getName());
+ }
+
+ public CreateCoordinationContextTest(String testName) {
+ super(testName);
+ }
+
+ protected void setUp() throws Exception {
+ ConfigurationContextFactory erfac = new ConfigurationContextFactory();
+ File file = new File(repository);
+ if (!file.exists()) {
+ throw new Exception(
+ "repository directory " + file.getAbsolutePath() +
+ " does not exists");
+ }
+ ConfigurationContext er = erfac.buildConfigurationContext(
+ file.getAbsolutePath());
+
+ server = new SimpleHTTPServer(er, 8081);
+
+ try {
+ server.start();
+ System.out.print(
+ "Server started on port " + 8081 +
+ ".....");
+ } finally {
+
+ }
+
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException e1) {
+ throw new AxisFault("Thread interuptted", e1);
+ }
+
+
+ }
+
+ protected void tearDown() throws Exception {
+ server.stop();
+ }
+
+
+
+ public void testEchoXMLSync() throws Exception {
+ TransactionManager tm = new TransactionManager(Constants.WS_AT, new EndpointReference("http://localhost:8081/axis/services/ActivationCoordinator"));
+ //Thread.sleep(100000);
+ tm.begin();
+ }
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org