summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache')
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java18
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java16
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java15
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java15
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java14
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java14
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java14
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java16
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java16
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java16
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCase.java16
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCase.java16
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCase.java16
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCase.java21
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java14
15 files changed, 162 insertions, 75 deletions
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java
index 7ee48d4451..09b414b2d8 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java
@@ -21,14 +21,17 @@ package org.apache.tuscany.sca.binding.ws.axis2.itests ;
import junit.framework.TestCase;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
public class HelloWorldNoWSDLTestCase extends TestCase {
- private SCADomain domain;
+ private Node node;
public void testHelloWorld() throws Exception {
- HelloWorld helloWorld = domain.getService(HelloWorld.class, "HelloWorldComponent");
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldComponent");
assertEquals("Hello petra", helloWorld.getGreetings("petra"));
}
@@ -36,7 +39,7 @@ public class HelloWorldNoWSDLTestCase extends TestCase {
* Test a a WS call with a complex type
*/
public void testEchoFoo() throws Exception {
- Echo echo = domain.getService(Echo.class, "EchoComponent");
+ Echo echo = node.getService(Echo.class, "EchoComponent");
Foo f = new Foo();
Bar b1 = new Bar();
@@ -66,12 +69,15 @@ public class HelloWorldNoWSDLTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite", new Contribution("test", contribution));
+ node.start();
}
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
}
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java
index e7511027c2..4bb5bdb87d 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java
@@ -26,11 +26,14 @@ import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMText;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
public class HelloWorldOMTestCase extends TestCase {
- private SCADomain domain;
+ private Node node;
private HelloWorldOM helloWorld;
public void testHelloWorld() throws Exception {
@@ -46,13 +49,16 @@ public class HelloWorldOMTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite");
- helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldComponent");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite", new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
}
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
}
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java
index a3a43d032f..ab197ae25e 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java
@@ -21,11 +21,14 @@ package org.apache.tuscany.sca.binding.ws.axis2.itests;
import junit.framework.TestCase;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
public class HelloWorldTestCase extends TestCase {
- private SCADomain domain;
+ private Node node;
private HelloWorld helloWorld;
public void testCalculator() throws Exception {
@@ -34,13 +37,15 @@ public class HelloWorldTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite");
- helloWorld = domain.getService(HelloWorld.class, "HelloWorldComponent");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite", new Contribution("test", contribution));
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldComponent");
}
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
}
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java
index 8e17b89f33..8b4113e7ec 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java
@@ -26,11 +26,14 @@ import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMText;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
public class HelloWorldWSDLMergedTestCase extends TestCase {
- private SCADomain domain;
+ private Node node;
private HelloWorldOM helloWorld;
public void testHelloWorld() throws Exception {
@@ -46,13 +49,15 @@ public class HelloWorldWSDLMergedTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite");
- helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldWSDLMergedComponent");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite", new Contribution("test", contribution));
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldWSDLMergedComponent");
}
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
}
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
index b276d8210f..6c62d52cc6 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
@@ -36,7 +36,10 @@ import javax.xml.namespace.QName;
import junit.framework.TestCase;
import org.apache.axis2.transport.http.server.HttpUtils;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
/**
* Test ?wsdl works and that the returned WSDL has the correct endpoint
@@ -45,7 +48,7 @@ import org.apache.tuscany.sca.host.embedded.SCADomain;
*/
public class QuestionMarkWSDLImportTestCase extends TestCase {
- private SCADomain domain;
+ private Node node;
/**
* Tests ?wsdl works and returns the correct port endpoint from the WSDL
@@ -85,12 +88,15 @@ public class QuestionMarkWSDLImportTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite", new Contribution("test", contribution));
+ node.start();
}
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
}
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
index 59eb6164fa..a9d31fb9a8 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
@@ -36,7 +36,10 @@ import javax.xml.namespace.QName;
import junit.framework.TestCase;
import org.apache.axis2.transport.http.server.HttpUtils;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
/**
* Test ?wsdl works and that the returned WSDL has the correct endpoint
@@ -45,7 +48,7 @@ import org.apache.tuscany.sca.host.embedded.SCADomain;
*/
public class QuestionMarkWSDLIncludeTestCase extends TestCase {
- private SCADomain domain;
+ private Node node;
/**
* Tests ?wsdl works and returns the correct port endpoint from the WSDL
@@ -85,12 +88,15 @@ public class QuestionMarkWSDLIncludeTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite", new Contribution("test", contribution));
+ node.start();
}
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
}
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
index 0508f28e11..63026f95f7 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
@@ -36,7 +36,10 @@ import javax.xml.namespace.QName;
import junit.framework.TestCase;
import org.apache.axis2.transport.http.server.HttpUtils;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
/**
* Test ?wsdl works and that the returned WSDL has the correct endpoint
@@ -45,7 +48,7 @@ import org.apache.tuscany.sca.host.embedded.SCADomain;
*/
public class QuestionMarkWSDLTestCase extends TestCase {
- private SCADomain domain;
+ private Node node;
/**
* Tests ?wsdl works and returns the correct port endpoint from the WSDL
@@ -113,12 +116,15 @@ public class QuestionMarkWSDLTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite", new Contribution("test", contribution));
+ node.start();
}
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
}
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java
index 5efbedba4c..7a6752126d 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java
@@ -26,7 +26,10 @@ import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMText;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.osoa.sca.ServiceRuntimeException;
/**
@@ -37,7 +40,7 @@ import org.osoa.sca.ServiceRuntimeException;
*/
public class UriPrecedenceTestCase extends TestCase {
- private SCADomain domain;
+ private Node node;
private HelloWorldOM helloWorld;
public void testUriPrecedence() throws Exception {
@@ -57,12 +60,15 @@ public class UriPrecedenceTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.composite");
- helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldComponent");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.composite", new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
}
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
}
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java
index 56d0537a44..a41e0fd2c9 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java
@@ -27,11 +27,14 @@ import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMText;
import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
public abstract class AbstractHelloWorldOMTestCase extends TestCase {
- private SCADomain domain;
+ private Node node;
private HelloWorldOM helloWorld;
public void testCalculator() throws Exception {
@@ -47,13 +50,16 @@ public abstract class AbstractHelloWorldOMTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance(getCompositeName());
- helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldComponent");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
}
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
protected String getCompositeName() {
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java
index f5d87cdcee..23dcd5ff6d 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java
@@ -22,11 +22,14 @@ package org.apache.tuscany.sca.binding.ws.axis2.itests.epr;
import junit.framework.TestCase;
import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorld;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
public class HelloWorldTestCase extends TestCase {
- private SCADomain domain;
+ private Node node;
private HelloWorld helloWorld;
public void testCalculator() throws Exception {
@@ -35,13 +38,16 @@ public class HelloWorldTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite");
- helloWorld = domain.getService(HelloWorld.class, "HelloWorldComponent");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite", new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldComponent");
}
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
}
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCase.java
index 6cdb12c221..dedd5a52a3 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCase.java
@@ -27,11 +27,14 @@ import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMText;
import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
public abstract class AbstractHelloWorldOMTestCase extends TestCase {
- private SCADomain domain;
+ private Node node;
private HelloWorldOM helloWorld;
public void testHelloWorld() throws Exception {
@@ -47,13 +50,16 @@ public abstract class AbstractHelloWorldOMTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance(getCompositeName());
- helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldComponent");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
}
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
protected String getCompositeName() {
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCase.java
index 458a472479..a432f46b7a 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCase.java
@@ -26,14 +26,17 @@ import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMText;
import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public abstract class AbstractHelloWorldOMTestCase {
- private SCADomain domain;
+ private Node node;
private HelloWorldOM helloWorld;
@Test
@@ -50,13 +53,16 @@ public abstract class AbstractHelloWorldOMTestCase {
@Before
public void setUp() throws Exception {
- domain = SCADomain.newInstance(getCompositeName());
- helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldComponent");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
}
@After
public void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
protected String getCompositeName() {
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCase.java
index 04de589fb1..66852c9ce3 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCase.java
@@ -27,11 +27,14 @@ import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMText;
import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
public abstract class AbstractHelloWorldOMTestCase extends TestCase {
- private SCADomain domain;
+ private Node node;
private HelloWorldOM helloWorld;
public void testHelloWorld() throws Exception {
@@ -47,13 +50,16 @@ public abstract class AbstractHelloWorldOMTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance(getCompositeName());
- helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldComponent");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
}
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
protected String getCompositeName() {
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCase.java
index b2ccd7f97d..b8304a0c61 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCase.java
@@ -22,37 +22,42 @@ package org.apache.tuscany.sca.binding.ws.axis2.itests.soap12 ;
import junit.framework.TestCase;
import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorld;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
public class HelloWorldSOAP12TestCase extends TestCase {
- private SCADomain domain;
+ private Node node;
public void testHelloWorld() throws Exception {
- HelloWorld helloWorld = domain.getService(HelloWorld.class, "HelloWorldClient");
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClient");
assertEquals("Hello petra", helloWorld.getGreetings("petra"));
}
public void testHelloWorldSOAP() throws Exception {
- HelloWorld helloWorld = domain.getService(HelloWorld.class, "HelloWorldClientSOAP");
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientSOAP");
assertEquals("Hello petra", helloWorld.getGreetings("petra"));
}
public void testHelloWorldSOAP11() throws Exception {
- HelloWorld helloWorld = domain.getService(HelloWorld.class, "HelloWorldClientSOAP11");
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientSOAP11");
assertEquals("Hello petra", helloWorld.getGreetings("petra"));
}
public void testHelloWorldSOAP12() throws Exception {
- HelloWorld helloWorld = domain.getService(HelloWorld.class, "HelloWorldClientSOAP12");
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientSOAP12");
assertEquals("Hello petra", helloWorld.getGreetings("petra"));
}
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite", new Contribution("test", contribution));
}
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
}
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java
index 8d378565d4..5a75846e9d 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java
@@ -33,7 +33,10 @@ import javax.xml.namespace.QName;
import junit.framework.TestCase;
import org.apache.axis2.transport.http.server.HttpUtils;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
/**
* Test ?wsdl works and that the returned WSDL has the correct endpoint
@@ -43,7 +46,7 @@ import org.apache.tuscany.sca.host.embedded.SCADomain;
public class QuestionMarkWSDLTestCase extends TestCase {
private static boolean newGenerator = true;
- private SCADomain domain;
+ private Node node;
/**
* Tests ?wsdl returns a soap 1.1 port by default
@@ -127,12 +130,15 @@ public class QuestionMarkWSDLTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite", new Contribution("test", contribution));
+ node.start();
}
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
}