tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r703068 [2/7] - in /tuscany/branches/sca-equinox: itest/callablereferences/src/test/java/org/apache/tuscany/sca/itest/callableref/ itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/ itest/databindings/jaxb-top...
Date Thu, 09 Oct 2008 06:34:01 GMT
Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,9 +27,9 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -38,13 +38,13 @@
 public class NoComponentImplementationTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
-        node = nodeFactory.createSCANode(new File("src/main/resources/NoComponentImplementation/Calculator.composite").toURL().toString(),
-        		                 new SCAContribution("TestContribution", 
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        node = nodeFactory.createNode(new File("src/main/resources/NoComponentImplementation/Calculator.composite").toURL().toString(),
+        		                 new Contribution("TestContribution", 
         		                                     new File("src/main/resources/NoComponentImplementation").toURL().toString()));
     }
 

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,10 +27,10 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -39,16 +39,16 @@
 public class NoCompositeNamespaceTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
-        node = nodeFactory.createSCANode(new File("src/main/resources/NoCompositeNamespace/Calculator.composite").toURL().toString(),
-        		                 new SCAContribution("TestContribution", 
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        node = nodeFactory.createNode(new File("src/main/resources/NoCompositeNamespace/Calculator.composite").toURL().toString(),
+        		                 new Contribution("TestContribution", 
         		                                     new File("src/main/resources/NoCompositeNamespace").toURL().toString()));
         node.start();
-        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+        calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
     }
 
     @Override

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,10 +27,10 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -39,17 +39,17 @@
 public class NoMatchingBindingTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
+        NodeFactory nodeFactory = NodeFactory.newInstance();
         node =
-            nodeFactory.createSCANode("Calculator.composite", new SCAContribution("TestContribution", new File("src/main/resources/NoMatchingBinding")
+            nodeFactory.createNode("Calculator.composite", new Contribution("TestContribution", new File("src/main/resources/NoMatchingBinding")
                 .toURL().toString()));
 
         node.start();
-        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+        calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
     }
 
     @Override

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,10 +27,10 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -39,16 +39,16 @@
 public class PromotedReferenceNotFoundTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
-        node = nodeFactory.createSCANode(new File("src/main/resources/PromotedReferenceNotFound/Calculator.composite").toURL().toString(),
-        		                 new SCAContribution("TestContribution", 
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        node = nodeFactory.createNode(new File("src/main/resources/PromotedReferenceNotFound/Calculator.composite").toURL().toString(),
+        		                 new Contribution("TestContribution", 
         		                                     new File("src/main/resources/PromotedReferenceNotFound").toURL().toString()));
         node.start();
-        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+        calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
     }
 
     @Override

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,10 +27,10 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -39,16 +39,16 @@
 public class PromotedServiceNotFoundTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
-        node = nodeFactory.createSCANode(new File("src/main/resources/PromotedServiceNotFound/Calculator.composite").toURL().toString(),
-        		                 new SCAContribution("TestContribution", 
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        node = nodeFactory.createNode(new File("src/main/resources/PromotedServiceNotFound/Calculator.composite").toURL().toString(),
+        		                 new Contribution("TestContribution", 
         		                                     new File("src/main/resources/PromotedServiceNotFound").toURL().toString()));
         node.start();
-        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+        calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
     }
 
     @Override

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,10 +27,10 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -39,16 +39,16 @@
 public class PropertyAttributeMustSupplyNullTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
-        node = nodeFactory.createSCANode(new File("src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite").toURL().toString(),
-        		                 new SCAContribution("TestContribution", 
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        node = nodeFactory.createNode(new File("src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite").toURL().toString(),
+        		                 new Contribution("TestContribution", 
         		                                     new File("src/main/resources/PropertyAttribute").toURL().toString()));
         node.start();
-        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+        calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
     }
 
     @Override

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,10 +27,10 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -39,16 +39,16 @@
 public class PropertyAttributeTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
-        node = nodeFactory.createSCANode(new File("src/main/resources/PropertyAttribute/Calculator.composite").toURL().toString(),
-        		                 new SCAContribution("TestContribution", 
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        node = nodeFactory.createNode(new File("src/main/resources/PropertyAttribute/Calculator.composite").toURL().toString(),
+        		                 new Contribution("TestContribution", 
         		                                     new File("src/main/resources/PropertyAttribute").toURL().toString()));
         node.start();
-        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+        calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
     }
 
     @Override

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,10 +27,10 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -39,16 +39,16 @@
 public class PropertyNotFoundTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
-        node = nodeFactory.createSCANode(new File("src/main/resources/PropertyNotFound/Calculator.composite").toURL().toString(),
-        		                 new SCAContribution("TestContribution", 
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        node = nodeFactory.createNode(new File("src/main/resources/PropertyNotFound/Calculator.composite").toURL().toString(),
+        		                 new Contribution("TestContribution", 
         		                                     new File("src/main/resources/PropertyNotFound").toURL().toString()));
         node.start();
-        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+        calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
     }
 
     @Override

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,10 +27,10 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -39,16 +39,16 @@
 public class PropertyOverrideManyAttributeTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
-        node = nodeFactory.createSCANode(new File("src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite").toURL().toString(),
-        		                 new SCAContribution("TestContribution", 
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        node = nodeFactory.createNode(new File("src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite").toURL().toString(),
+        		                 new Contribution("TestContribution", 
         		                                     new File("src/main/resources/PropertyAttribute").toURL().toString()));
         node.start();
-        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+        calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
     }
 
     @Override

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,10 +27,10 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -39,16 +39,16 @@
 public class ReferenceIncompatibleComponentInterfaceTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
-        node = nodeFactory.createSCANode(new File("src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite").toURL().toString(),
-        		                 new SCAContribution("TestContribution", 
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        node = nodeFactory.createNode(new File("src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite").toURL().toString(),
+        		                 new Contribution("TestContribution", 
         		                                     new File("src/main/resources/ReferenceIncompatibleComponentInterface").toURL().toString()));
         node.start();
-        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+        calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
     }
 
     @Override

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,10 +27,10 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -39,16 +39,16 @@
 public class ReferenceIncompatibleInterfaceTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
-        node = nodeFactory.createSCANode(new File("src/main/resources/ReferenceIncompatibleInterface/Calculator.composite").toURL().toString(),
-        		                 new SCAContribution("TestContribution", 
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        node = nodeFactory.createNode(new File("src/main/resources/ReferenceIncompatibleInterface/Calculator.composite").toURL().toString(),
+        		                 new Contribution("TestContribution", 
         		                                     new File("src/main/resources/ReferenceIncompatibleInterface").toURL().toString()));
         node.start();
-        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+        calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
     }
 
     @Override

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,10 +27,10 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -39,16 +39,16 @@
 public class ReferenceIncompatibleMultiplicityTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
-        node = nodeFactory.createSCANode(new File("src/main/resources/ReferenceIncompatibleMultiplicity/Calculator.composite").toURL().toString(),
-        		                 new SCAContribution("TestContribution", 
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        node = nodeFactory.createNode(new File("src/main/resources/ReferenceIncompatibleMultiplicity/Calculator.composite").toURL().toString(),
+        		                 new Contribution("TestContribution", 
         		                                     new File("src/main/resources/ReferenceIncompatibleMultiplicity").toURL().toString()));
         node.start();
-        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+        calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
     }
 
     @Override

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,10 +27,10 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -39,16 +39,16 @@
 public class ReferenceWithoutTargetsTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
-        node = nodeFactory.createSCANode(new File("src/main/resources/ReferenceWithoutTargets/Calculator.composite").toURL().toString(),
-        		                 new SCAContribution("TestContribution", 
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        node = nodeFactory.createNode(new File("src/main/resources/ReferenceWithoutTargets/Calculator.composite").toURL().toString(),
+        		                 new Contribution("TestContribution", 
         		                                     new File("src/main/resources/ReferenceWithoutTargets").toURL().toString()));
         node.start();
-        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+        calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
     }
 
     @Override

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,10 +27,10 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -39,16 +39,16 @@
 public class ServiceNotFoundForComponentServiceTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
-        node = nodeFactory.createSCANode(new File("src/main/resources/ServiceNotFoundForComponentService/Calculator.composite").toURL().toString(),
-        		                 new SCAContribution("TestContribution", 
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        node = nodeFactory.createNode(new File("src/main/resources/ServiceNotFoundForComponentService/Calculator.composite").toURL().toString(),
+        		                 new Contribution("TestContribution", 
         		                                     new File("src/main/resources/ServiceNotFoundForComponentService").toURL().toString()));
         node.start();
-        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+        calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
     }
 
     @Override

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,9 +27,9 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.apache.tuscany.sca.node.impl.NodeImpl;
 
 /**
@@ -38,13 +38,13 @@
 public class UnresolvedComponentImplementationTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
-        node = nodeFactory.createSCANode(new File("src/main/resources/UnresolvedComponentImplementation/Calculator.composite").toURL().toString(),
-        		                 new SCAContribution("TestContribution", 
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        node = nodeFactory.createNode(new File("src/main/resources/UnresolvedComponentImplementation/Calculator.composite").toURL().toString(),
+        		                 new Contribution("TestContribution", 
         		                                     new File("src/main/resources/UnresolvedComponentImplementation").toURL().toString()));
     }
 

Modified: tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java (original)
+++ tuscany/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java Wed Oct  8 23:33:54 2008
@@ -22,10 +22,10 @@
 
 import junit.framework.TestCase;
 
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 /**
  * This shows how to test the Calculator service component.
@@ -33,18 +33,18 @@
 public class XSDValidationTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode node;
+    private Node node;
     private Exception startUpException;
 
     @Override
     protected void setUp() throws Exception {
-        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
+        NodeFactory nodeFactory = NodeFactory.newInstance();
         try {
-            node = nodeFactory.createSCANode(new File("src/main/resources/XsdValidation/Calculator.composite").toURL().toString(),
-            		                 new SCAContribution("TestContribution", 
+            node = nodeFactory.createNode(new File("src/main/resources/XsdValidation/Calculator.composite").toURL().toString(),
+            		                 new Contribution("TestContribution", 
             		                                     new File("src/main/resources/XsdValidation").toURL().toString()));
             node.start();
-            calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+            calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
         } catch (Exception ex){
             startUpException = ex;
         }        

Modified: tuscany/branches/sca-equinox/modules/binding-atom-abdera/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-atom-abdera/pom.xml?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-atom-abdera/pom.xml (original)
+++ tuscany/branches/sca-equinox/modules/binding-atom-abdera/pom.xml Wed Oct  8 23:33:54 2008
@@ -162,7 +162,7 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-host-embedded</artifactId>
+            <artifactId>tuscany-node-impl</artifactId>
             <version>1.4-SNAPSHOT</version>
             <scope>test</scope>
         </dependency>

Modified: tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java Wed Oct  8 23:33:54 2008
@@ -8,37 +8,53 @@
 import org.apache.abdera.model.Content;
 import org.apache.abdera.model.Entry;
 import org.apache.tuscany.sca.binding.atom.collection.Collection;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Client;
+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.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class AtomDeleteTestCase {
-    protected static SCADomain scaConsumerDomain;
-    protected static SCADomain scaProviderDomain;
+    protected static Node consumerNode;
+    protected static Node providerNode;
     protected static CustomerClient testService;
     protected static Abdera abdera;
 
     @BeforeClass
     public static void init() throws Exception {
+        try{
         System.out.println(">>>AtomDeleteTestCase.init entry");
-        scaProviderDomain = SCADomain.newInstance("org/apache/tuscany/sca/binding/atom/Provider.composite");
-        scaConsumerDomain = SCADomain.newInstance("org/apache/tuscany/sca/binding/atom/Consumer.composite");
-        testService = scaConsumerDomain.getService(CustomerClient.class, "CustomerClient");
+        String contribution = ContributionLocationHelper.getContributionLocation(AtomDeleteTestCase.class);
+        providerNode = NodeFactory.newInstance().createNode(
+                                                               "org/apache/tuscany/sca/binding/atom/Provider.composite", new Contribution("provider", contribution));
+        consumerNode = NodeFactory.newInstance().createNode(
+                                                               "org/apache/tuscany/sca/binding/atom/Consumer.composite", new Contribution("consumer", contribution));
+        providerNode.start();
+        consumerNode.start();
+        testService = consumerNode.getService(CustomerClient.class, "CustomerClient");
         abdera = new Abdera();
+        } catch (Exception e) {
+            e.printStackTrace();
+            
+        }
     }
 
     @AfterClass
     public static void destroy() throws Exception {
         // System.out.println(">>>AtomDeleteTestCase.destroy entry");
-        scaConsumerDomain.close();
-        scaProviderDomain.close();
+        consumerNode.stop();
+        consumerNode.destroy();
+        providerNode.stop();
+        providerNode.destroy();
     }
 
     @Test
     public void testPrelim() throws Exception {
-        Assert.assertNotNull(scaProviderDomain);
-        Assert.assertNotNull(scaConsumerDomain);
+        Assert.assertNotNull(providerNode);
+        Assert.assertNotNull(consumerNode);
         Assert.assertNotNull(testService);
         Assert.assertNotNull(abdera);
     }

Modified: tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java Wed Oct  8 23:33:54 2008
@@ -6,37 +6,47 @@
 import org.apache.abdera.model.Content;
 import org.apache.abdera.model.Entry;
 import org.apache.tuscany.sca.binding.atom.collection.Collection;
-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.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class AtomGetTestCase {
-    protected static SCADomain scaConsumerDomain;
-    protected static SCADomain scaProviderDomain;
+    protected static Node consumerNode;
+    protected static Node providerNode;
     protected static CustomerClient testService;
     protected static Abdera abdera;
 
     @BeforeClass
     public static void init() throws Exception {
         System.out.println(">>>AtomGetTestCase.init entry");
-        scaProviderDomain = SCADomain.newInstance("org/apache/tuscany/sca/binding/atom/Provider.composite");
-        scaConsumerDomain = SCADomain.newInstance("org/apache/tuscany/sca/binding/atom/Consumer.composite");
-        testService = scaConsumerDomain.getService(CustomerClient.class, "CustomerClient");
+        String contribution = ContributionLocationHelper.getContributionLocation(AtomDeleteTestCase.class);
+        providerNode = NodeFactory.newInstance().createNode(
+                                                               "org/apache/tuscany/sca/binding/atom/Provider.composite", new Contribution("provider", contribution));
+        consumerNode = NodeFactory.newInstance().createNode(
+                                                               "org/apache/tuscany/sca/binding/atom/Consumer.composite", new Contribution("consumer", contribution));
+        providerNode.start();
+        consumerNode.start();
+        testService = consumerNode.getService(CustomerClient.class, "CustomerClient");
         abdera = new Abdera();
     }
 
     @AfterClass
     public static void destroy() throws Exception {
         // System.out.println(">>>AtomGetTestCase.destroy entry");
-        scaConsumerDomain.close();
-        scaProviderDomain.close();
+        consumerNode.stop();
+        consumerNode.destroy();
+        providerNode.stop();
+        providerNode.destroy();
     }
 
     @Test
     public void testPrelim() throws Exception {
-        Assert.assertNotNull(scaProviderDomain);
-        Assert.assertNotNull(scaConsumerDomain);
+        Assert.assertNotNull(providerNode);
+        Assert.assertNotNull(consumerNode);
         Assert.assertNotNull(testService);
         Assert.assertNotNull(abdera);
     }

Modified: tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPostTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPostTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPostTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPostTestCase.java Wed Oct  8 23:33:54 2008
@@ -6,37 +6,47 @@
 import org.apache.abdera.model.Content;
 import org.apache.abdera.model.Entry;
 import org.apache.tuscany.sca.binding.atom.collection.Collection;
-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.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class AtomPostTestCase {
-    protected static SCADomain scaConsumerDomain;
-    protected static SCADomain scaProviderDomain;
+    protected static Node consumerNode;
+    protected static Node providerNode;
     protected static CustomerClient testService;
     protected static Abdera abdera;
 
     @BeforeClass
     public static void init() throws Exception {
         System.out.println(">>>AtomPostTestCase.init entry");
-        scaProviderDomain = SCADomain.newInstance("org/apache/tuscany/sca/binding/atom/Provider.composite");
-        scaConsumerDomain = SCADomain.newInstance("org/apache/tuscany/sca/binding/atom/Consumer.composite");
-        testService = scaConsumerDomain.getService(CustomerClient.class, "CustomerClient");
+        String contribution = ContributionLocationHelper.getContributionLocation(AtomDeleteTestCase.class);
+        providerNode = NodeFactory.newInstance().createNode(
+                                                               "org/apache/tuscany/sca/binding/atom/Provider.composite", new Contribution("provider", contribution));
+        consumerNode = NodeFactory.newInstance().createNode(
+                                                               "org/apache/tuscany/sca/binding/atom/Consumer.composite", new Contribution("consumer", contribution));
+        providerNode.start();
+        consumerNode.start();
+        testService = consumerNode.getService(CustomerClient.class, "CustomerClient");
         abdera = new Abdera();
     }
 
     @AfterClass
     public static void destroy() throws Exception {
         System.out.println(">>>AtomPostTestCase.destroy entry");
-        scaConsumerDomain.close();
-        scaProviderDomain.close();
+        consumerNode.stop();
+        consumerNode.destroy();
+        providerNode.stop();
+        providerNode.destroy();
     }
 
     @Test
     public void testPrelim() throws Exception {
-        Assert.assertNotNull(scaProviderDomain);
-        Assert.assertNotNull(scaConsumerDomain);
+        Assert.assertNotNull(providerNode);
+        Assert.assertNotNull(consumerNode);
         Assert.assertNotNull(testService);
         Assert.assertNotNull(abdera);
     }

Modified: tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPutTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPutTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPutTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPutTestCase.java Wed Oct  8 23:33:54 2008
@@ -8,37 +8,47 @@
 import org.apache.abdera.model.Content;
 import org.apache.abdera.model.Entry;
 import org.apache.tuscany.sca.binding.atom.collection.Collection;
-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.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class AtomPutTestCase {
-    protected static SCADomain scaConsumerDomain;
-    protected static SCADomain scaProviderDomain;
+    protected static Node consumerNode;
+    protected static Node providerNode;
     protected static CustomerClient testService;
     protected static Abdera abdera;
 
     @BeforeClass
     public static void init() throws Exception {
         System.out.println(">>>AtomPutTestCase.init entry");
-        scaProviderDomain = SCADomain.newInstance("org/apache/tuscany/sca/binding/atom/Provider.composite");
-        scaConsumerDomain = SCADomain.newInstance("org/apache/tuscany/sca/binding/atom/Consumer.composite");
-        testService = scaConsumerDomain.getService(CustomerClient.class, "CustomerClient");
+        String contribution = ContributionLocationHelper.getContributionLocation(AtomDeleteTestCase.class);
+        providerNode = NodeFactory.newInstance().createNode(
+                                                               "org/apache/tuscany/sca/binding/atom/Provider.composite", new Contribution("provider", contribution));
+        consumerNode = NodeFactory.newInstance().createNode(
+                                                               "org/apache/tuscany/sca/binding/atom/Consumer.composite", new Contribution("consumer", contribution));
+        providerNode.start();
+        consumerNode.start();
+        testService = consumerNode.getService(CustomerClient.class, "CustomerClient");
         abdera = new Abdera();
     }
 
     @AfterClass
     public static void destroy() throws Exception {
         // System.out.println(">>>AtomPutTestCase.destroy entry");
-        scaConsumerDomain.close();
-        scaProviderDomain.close();
+        consumerNode.stop();
+        consumerNode.destroy();
+        providerNode.stop();
+        providerNode.destroy();
     }
 
     @Test
     public void testPrelim() throws Exception {
-        Assert.assertNotNull(scaProviderDomain);
-        Assert.assertNotNull(scaConsumerDomain);
+        Assert.assertNotNull(providerNode);
+        Assert.assertNotNull(consumerNode);
         Assert.assertNotNull(testService);
         Assert.assertNotNull(abdera);
     }

Modified: tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/Consumer.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/Consumer.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/Consumer.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/Consumer.java Wed Oct  8 23:33:54 2008
@@ -19,17 +19,24 @@
 
 package org.apache.tuscany.sca.binding.atom;
 
-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 Consumer {
 
     public static void main(String[] args) throws Exception {
 
-        SCADomain scaDomain = SCADomain.newInstance("org/apache/tuscany/sca/binding/atom/Consumer.composite");
+        String contribution = ContributionLocationHelper.getContributionLocation(AtomDeleteTestCase.class);
+        Node node = NodeFactory.newInstance().createNode(
+                                                         "org/apache/tuscany/sca/binding/atom/Consumer.composite", new Contribution("consumer", contribution));
+        node.start();
 
-        CustomerClient testService = scaDomain.getService(CustomerClient.class, "CustomerClient");
+        CustomerClient testService = node.getService(CustomerClient.class, "CustomerClient");
         testService.testCustomerCollection();
 
-        scaDomain.close();
+        node.stop();
+        node.destroy();
     }
 }

Modified: tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ConsumerProviderAtomTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ConsumerProviderAtomTestCase.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ConsumerProviderAtomTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ConsumerProviderAtomTestCase.java Wed Oct  8 23:33:54 2008
@@ -27,7 +27,10 @@
 import org.apache.abdera.model.Entry;
 import org.apache.abdera.model.Feed;
 import org.apache.tuscany.sca.binding.atom.collection.Collection;
-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.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -37,119 +40,126 @@
  */
 public class ConsumerProviderAtomTestCase {
 
-	protected static SCADomain scaConsumerDomain;
-	protected static SCADomain scaProviderDomain;
-	protected static CustomerClient testService;
-	protected static Abdera abdera;
-
-	@BeforeClass
-	public static void init() throws Exception {
-		System.out.println(">>>AtomBindingIntegratedTestCase.init entry");
-		scaProviderDomain = SCADomain.newInstance("org/apache/tuscany/sca/binding/atom/Provider.composite");
-		scaConsumerDomain = SCADomain.newInstance("org/apache/tuscany/sca/binding/atom/Consumer.composite");
-		testService = scaConsumerDomain.getService(CustomerClient.class,"CustomerClient");
-		abdera = new Abdera();
-	}
-
-	@AfterClass
-	public static void destroy() throws Exception {
-		System.out.println(">>>AtomBindingIntegratedTestCase.destroy entry");
-		scaConsumerDomain.close();
-		scaProviderDomain.close();
-	}
-
-	@Test
-	public void testPrelim() throws Exception {
-		Assert.assertNotNull(scaProviderDomain);
-		Assert.assertNotNull(scaConsumerDomain);
-		Assert.assertNotNull(testService);
-		Assert.assertNotNull(abdera);
-	}
-
-	@Test
-	public void testEntry() throws Exception {
-		// System.out.println( getClass().getName() + ".testEntry entry" );
-		Entry entry = abdera.newEntry();
-		Assert.assertNotNull(entry);
-
-		String testTitle = "Sponge Bob";
-		entry.setTitle(testTitle);
-		Assert.assertEquals(testTitle, entry.getTitle());
-
-		String testContent = "This is the content";
-		entry.setContent(testContent);
-		Assert.assertEquals(testContent, entry.getContent());
-
-		Date now = new Date();
-		entry.setEdited(now);
-		Assert.assertEquals(now, entry.getEdited());
-
-		Date later = new Date();
-		entry.setPublished(later);
-		Assert.assertEquals(later, entry.getPublished());
-
-		String testSummary = "This is the summary";
-		entry.setSummary(testSummary);
-		Assert.assertEquals(testSummary, entry.getSummary());
-	}
-
-	@Test
-	public void testCustomerCollection() throws Exception {
-		System.out.println(getClass().getName()	+ ".testCustomerCollection entry");
-		Collection resourceCollection = testService.getCustomerCollection();
-		Assert.assertNotNull(resourceCollection);
-		
-		Entry newEntry = newEntry("Sponge Bob");
-	        System.out.println(">>> post entry=" + newEntry.getTitle());
-	        newEntry = resourceCollection.post(newEntry);
-	        System.out.println("<<< post id=" + newEntry.getId() + " entry=" + newEntry.getTitle());
-
-	        newEntry = newEntry("Jane Bond");
-	        System.out.println(">>> post entry=" + newEntry.getTitle());
-	        newEntry = resourceCollection.post(newEntry);
-	        System.out.println("<<< post id=" + newEntry.getId() + " entry=" + newEntry.getTitle());
-
-	        System.out.println(">>> get id=" + newEntry.getId());
-	        Entry entry = resourceCollection.get(newEntry.getId().toString());
-	        System.out.println("<<< get id=" + entry.getId() + " entry=" + entry.getTitle());
-
-	        System.out.println(">>> put id=" + newEntry.getId() + " entry=" + entry.getTitle());
-	        resourceCollection.put(entry.getId().toString(), updateEntry(entry, "James Bond"));
-	        System.out.println("<<< put id=" + entry.getId() + " entry=" + entry.getTitle());
-
-	        System.out.println(">>> delete id=" + entry.getId());
-	        resourceCollection.delete(entry.getId().toString());
-	        System.out.println("<<< delete id=" + entry.getId());
-	        
-	        System.out.println(">>> get collection");
-	        Feed feed = resourceCollection.getFeed();
-	        System.out.println("<<< get collection");
-	        for (Object o : feed.getEntries()) {
-	            Entry e = (Entry)o;
-	            System.out.println("id = " + e.getId() + " entry = " + e.getTitle());
-	        }
-	}
-
-	private Entry newEntry(String value) {
-		Entry entry = abdera.newEntry();
-		entry.setTitle("customer " + value);
-
-		Content content = abdera.getFactory().newContent();
-		content.setContentType(Content.Type.TEXT);
-		content.setValue(value);
-		entry.setContentElement(content);
-
-		return entry;
-	}
-
-	private Entry updateEntry(Entry entry, String value) {
-		entry.setTitle("customer " + value);
-
-		Content content = abdera.getFactory().newContent();
-		content.setContentType(Content.Type.TEXT);
-		content.setValue(value);
-		entry.setContentElement(content);
-
-		return entry;
-	}
-}
\ No newline at end of file
+    protected static Node consumerNode;
+    protected static Node providerNode;
+    protected static CustomerClient testService;
+    protected static Abdera abdera;
+
+    @BeforeClass
+    public static void init() throws Exception {
+        System.out.println(">>>AtomBindingIntegratedTestCase.init entry");
+        String contribution = ContributionLocationHelper.getContributionLocation(AtomDeleteTestCase.class);
+        providerNode = NodeFactory.newInstance().createNode(
+                                                               "org/apache/tuscany/sca/binding/atom/Provider.composite", new Contribution("provider", contribution));
+        consumerNode = NodeFactory.newInstance().createNode(
+                                                               "org/apache/tuscany/sca/binding/atom/Consumer.composite", new Contribution("consumer", contribution));
+        providerNode.start();
+        consumerNode.start();
+        testService = consumerNode.getService(CustomerClient.class, "CustomerClient");
+        abdera = new Abdera();
+    }
+
+    @AfterClass
+    public static void destroy() throws Exception {
+        System.out.println(">>>AtomBindingIntegratedTestCase.destroy entry");
+        consumerNode.stop();
+        consumerNode.destroy();
+        providerNode.stop();
+        providerNode.destroy();
+    }
+
+    @Test
+    public void testPrelim() throws Exception {
+        Assert.assertNotNull(providerNode);
+        Assert.assertNotNull(consumerNode);
+        Assert.assertNotNull(testService);
+        Assert.assertNotNull(abdera);
+    }
+
+    @Test
+    public void testEntry() throws Exception {
+        // System.out.println( getClass().getName() + ".testEntry entry" );
+        Entry entry = abdera.newEntry();
+        Assert.assertNotNull(entry);
+
+        String testTitle = "Sponge Bob";
+        entry.setTitle(testTitle);
+        Assert.assertEquals(testTitle, entry.getTitle());
+
+        String testContent = "This is the content";
+        entry.setContent(testContent);
+        Assert.assertEquals(testContent, entry.getContent());
+
+        Date now = new Date();
+        entry.setEdited(now);
+        Assert.assertEquals(now, entry.getEdited());
+
+        Date later = new Date();
+        entry.setPublished(later);
+        Assert.assertEquals(later, entry.getPublished());
+
+        String testSummary = "This is the summary";
+        entry.setSummary(testSummary);
+        Assert.assertEquals(testSummary, entry.getSummary());
+    }
+
+    @Test
+    public void testCustomerCollection() throws Exception {
+        System.out.println(getClass().getName() + ".testCustomerCollection entry");
+        Collection resourceCollection = testService.getCustomerCollection();
+        Assert.assertNotNull(resourceCollection);
+
+        Entry newEntry = newEntry("Sponge Bob");
+        System.out.println(">>> post entry=" + newEntry.getTitle());
+        newEntry = resourceCollection.post(newEntry);
+        System.out.println("<<< post id=" + newEntry.getId() + " entry=" + newEntry.getTitle());
+
+        newEntry = newEntry("Jane Bond");
+        System.out.println(">>> post entry=" + newEntry.getTitle());
+        newEntry = resourceCollection.post(newEntry);
+        System.out.println("<<< post id=" + newEntry.getId() + " entry=" + newEntry.getTitle());
+
+        System.out.println(">>> get id=" + newEntry.getId());
+        Entry entry = resourceCollection.get(newEntry.getId().toString());
+        System.out.println("<<< get id=" + entry.getId() + " entry=" + entry.getTitle());
+
+        System.out.println(">>> put id=" + newEntry.getId() + " entry=" + entry.getTitle());
+        resourceCollection.put(entry.getId().toString(), updateEntry(entry, "James Bond"));
+        System.out.println("<<< put id=" + entry.getId() + " entry=" + entry.getTitle());
+
+        System.out.println(">>> delete id=" + entry.getId());
+        resourceCollection.delete(entry.getId().toString());
+        System.out.println("<<< delete id=" + entry.getId());
+
+        System.out.println(">>> get collection");
+        Feed feed = resourceCollection.getFeed();
+        System.out.println("<<< get collection");
+        for (Object o : feed.getEntries()) {
+            Entry e = (Entry)o;
+            System.out.println("id = " + e.getId() + " entry = " + e.getTitle());
+        }
+    }
+
+    private Entry newEntry(String value) {
+        Entry entry = abdera.newEntry();
+        entry.setTitle("customer " + value);
+
+        Content content = abdera.getFactory().newContent();
+        content.setContentType(Content.Type.TEXT);
+        content.setValue(value);
+        entry.setContentElement(content);
+
+        return entry;
+    }
+
+    private Entry updateEntry(Entry entry, String value) {
+        entry.setTitle("customer " + value);
+
+        Content content = abdera.getFactory().newContent();
+        content.setContentType(Content.Type.TEXT);
+        content.setValue(value);
+        entry.setContentElement(content);
+
+        return entry;
+    }
+}

Modified: tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ContentNegotiationTest.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ContentNegotiationTest.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ContentNegotiationTest.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ContentNegotiationTest.java Wed Oct  8 23:33:54 2008
@@ -20,230 +20,246 @@
 
 import java.io.IOException;
 import java.io.Reader;
-import java.text.SimpleDateFormat;
 import java.util.Date;
 
 import junit.framework.Assert;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import org.apache.tuscany.sca.binding.atom.collection.Collection;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
 import org.apache.abdera.Abdera;
-import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.factory.Factory;
-import org.apache.abdera.model.Base;
+import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.model.Content;
+import org.apache.abdera.model.Document;
 import org.apache.abdera.model.Entry;
 import org.apache.abdera.model.Feed;
-import org.apache.abdera.model.Document;
-import org.apache.abdera.model.Service;
+import org.apache.abdera.parser.Parser;
 import org.apache.abdera.protocol.Response.ResponseType;
 import org.apache.abdera.protocol.client.AbderaClient;
 import org.apache.abdera.protocol.client.ClientResponse;
 import org.apache.abdera.protocol.client.RequestOptions;
-import org.apache.abdera.protocol.client.util.BaseRequestEntity;
-import org.apache.abdera.util.EntityTag;
-import org.apache.abdera.parser.Parser;
-
+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.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
 /**
- * Tests use of content negotiation for Atom binding in Tuscany.
- * Uses the SCA provided Provider composite to act as a server.
- * Uses the Abdera provided Client to act as a client.
+ * Tests use of content negotiation for Atom binding in Tuscany. Uses the SCA
+ * provided Provider composite to act as a server. Uses the Abdera provided
+ * Client to act as a client.
  */
 public class ContentNegotiationTest {
-	public final static String providerURI = "http://localhost:8084/customer";
-	protected static SCADomain scaProviderDomain;
-	protected static CustomerClient testService;
+    public final static String providerURI = "http://localhost:8084/customer";
+    protected static Node providerNode;
     protected static Abdera abdera;
     protected static AbderaClient client;
-    protected static Parser abderaParser;    
+    protected static Parser abderaParser;
     protected static String lastId;
 
-	@BeforeClass
-	public static void init() throws Exception {
-		System.out.println(">>>ContentNegotiationTest.init");
-		scaProviderDomain = SCADomain.newInstance("org/apache/tuscany/sca/binding/atom/Provider.composite");
-		abdera = new Abdera();
-		client = new AbderaClient(abdera);
-		abderaParser = Abdera.getNewParser();
-	}
-
-	@AfterClass
-	public static void destroy() throws Exception {
-		System.out.println(">>>ContentNegotiationTest.destroy");
-		scaProviderDomain.close();
-	}
-
-	@Test
-	public void testPrelim() throws Exception {
-		Assert.assertNotNull(scaProviderDomain);
-		Assert.assertNotNull( client );
-	}
-	
-    @Test
-	public void testPost() throws Exception {
-		System.out.println(">>>ContentNegotiationTest.testPost");
-		// Testing of entry creation
-		Factory factory = abdera.getFactory();
-		String customerName = "Fred Farkle";
-		Entry entry = factory.newEntry();
-		entry.setTitle("customer " + customerName);
-		entry.setUpdated(new Date());
-		entry.addAuthor("Apache Tuscany");
-		// ID created by collection.
-		Content content = abdera.getFactory().newContent();
-		content.setContentType(Content.Type.TEXT);
-		content.setValue(customerName);
-		entry.setContentElement(content);
-
-		RequestOptions opts = new RequestOptions();
-		final String contentType = "application/atom+xml; type=entry"; 
-		opts.setContentType(contentType);
-		// AtomTestCaseUtils.printRequestHeaders( "Post request headers", "   ", opts );
-		IRI colUri = new IRI(providerURI).resolve("customer");
-		// res = client.post(colUri.toString() + "?test=foo", entry, opts);
-		ClientResponse res = client.post(colUri.toString(), entry, opts);
-		
-	    // Assert response status code is 201-OK.
-		// Assert response header Content-Type: application/atom+xml; charset=UTF-8
-    	Assert.assertEquals(201, res.getStatus());
-    	String returnedContentType = res.getContentType().toString().trim();
-    	Assert.assertEquals(contentType, returnedContentType );
-
-    	String eTag = res.getHeader( "ETag" );
-    	if ( eTag != null)
-    		lastId = eTag.substring( 1, eTag.length()-1);
-    	
-    	// AtomTestCaseUtils.printResponseHeaders( "Entry post response headers:", "   ", res );
-    	// System.out.println("Entry post response content:");
-    	// AtomTestCaseUtils.prettyPrint(abdera, res.getDocument());
-	}
-
-	@Test
-	public void testXMLEntryGet() throws Exception {
-		System.out.println(">>>ContentNegotiationTest.testXMLEntryGet");
-		RequestOptions opts = new RequestOptions();
-		opts.setHeader( "Accept", "application/atom+xml" );
-		
-		IRI colUri = new IRI(providerURI).resolve("customer");
-		ClientResponse res = client.get(colUri.toString() + "/" + lastId, opts);
-    	Assert.assertEquals(200, res.getStatus());
-    	String returnedContentType = res.getContentType().toString().trim();
-    	// Assert.assertEquals(contentType, returnedContentType );
-		res.release();	    
-	}
-
-	@Test
-	public void testJSONEntryGet() throws Exception {
-		System.out.println(">>>ContentNegotiationTest.testJSONEntryGet");
-		RequestOptions opts = new RequestOptions();
-		opts.setHeader( "Accept", "application/json" );
-		
-		IRI colUri = new IRI(providerURI).resolve("customer");
-		ClientResponse res = client.get(colUri.toString() + "/" + lastId, opts);
-		try {
-			Assert.assertEquals(200, res.getStatus());
-			// Abdera 0.4 throws exception on getContentType with application/json.    	
-			// System.out.println( "ContentNegotiationTest.testJSONEntryGet contentType=" + res.getContentType());
-			String contentType = res.getHeader( "Content-Type");
-			Assert.assertTrue( -1 < contentType.indexOf( "application/json" ));
-			// Following is a poor man's JSONObject test to avoid dependency on JSON libs.
-			// JSONObject jsonResp = new JSONObject(res.);
-			// Assert.assertEquals(12345, jsonResp.getInt("result"));
-			String responseBody = readResponse( res.getReader() );
-			Assert.assertTrue( responseBody.startsWith( "{") );
-			Assert.assertTrue( responseBody.endsWith( "}") );
-			Assert.assertTrue( -1 < responseBody.indexOf( "\"id\"" ));
-			Assert.assertTrue( -1 < responseBody.indexOf( "\"title\"" ));
-			Assert.assertTrue( -1 < responseBody.indexOf( "\"updated\"" ));
-			// AtomTestCaseUtils.printResponseHeaders( "JSON Entry response headers:", "   ", res );
-			// System.out.println( "ContentNegotiationTest.testJSONEntryGet JSON entry body=" + responseBody );
-		} finally {
-			res.release();	    			
-		}
-	}
-
-	@Test
-    public void testXMLFeedGet() throws Exception {		
-		System.out.println(">>>ContentNegotiationTest.testXMLFeedGet");
-		RequestOptions opts = new RequestOptions();
-		opts.setHeader( "Accept", "application/atom+xml" );
-		
-		// Atom feed request
-		ClientResponse res = client.get(providerURI, opts);
-		Assert.assertNotNull(res);
-		try {
-			// Asser feed provided since no predicates
-			Assert.assertEquals(200, res.getStatus());
-			Assert.assertEquals(ResponseType.SUCCESS, res.getType());
-	    	// AtomTestCaseUtils.printResponseHeaders( "Feed response headers:", "   ", res );
-	    	// System.out.println("Feed response content:");
-	    	// AtomTestCaseUtils.prettyPrint(abdera, res.getDocument());
-
-	    	// Perform other tests on feed.
-			Document<Feed> doc = res.getDocument();
-			Assert.assertNotNull( doc );
-			Feed feed = doc.getRoot();
-			Assert.assertNotNull( feed );
-			// RFC 4287 requires non-null id, title, updated elements
-			Assert.assertNotNull( feed.getId() );
-			Assert.assertNotNull( feed.getTitle() );
-			Assert.assertNotNull( feed.getUpdated() );
-			// AtomTestCaseUtils.printFeed( "Feed values", "   ", feed );
-		} finally {
-			res.release();
-		}
-	}		
-
-	@Test
-    public void testJSONFeedGet() throws Exception {		
-		System.out.println(">>>ContentNegotiationTest.testJSONFeedGet");
-		RequestOptions opts = new RequestOptions();
-		opts.setHeader( "Accept", "application/json" );
-		
-		// JSON feed request
-		ClientResponse res = client.get(providerURI, opts);
-		Assert.assertNotNull(res);
-		try {
-			// Assert feed provided since no predicates
-			Assert.assertEquals(200, res.getStatus());
-			// Abdera 0.4 throws exception on getContentType with application/json.    	
-			// System.out.println( "ContentNegotiationTest.testJSONEntryGet contentType=" + res.getContentType());
-			String contentType = res.getHeader( "Content-Type");
-			Assert.assertTrue( -1 < contentType.indexOf( "application/json" ));
-			// Following is a poor man's JSONObject test to avoid dependency on JSON libs.
-			// JSONObject jsonResp = new JSONObject(res.);
-			// Assert.assertEquals(12345, jsonResp.getInt("result"));
-			String responseBody = readResponse( res.getReader() );
-			Assert.assertTrue( responseBody.startsWith( "{") );
-			Assert.assertTrue( responseBody.endsWith( "}") );
-			Assert.assertTrue( -1 < responseBody.indexOf( "\"id\"" ));
-			Assert.assertTrue( -1 < responseBody.indexOf( "\"title\"" ));
-			Assert.assertTrue( -1 < responseBody.indexOf( "\"updated\"" ));
-			Assert.assertTrue( -1 < responseBody.indexOf( "\"entries\"" ));
-			// AtomTestCaseUtils.printResponseHeaders( "JSON Entry response headers:", "   ", res );
-			// System.out.println( "ContentNegotiationTest.testJSONEntryGet JSON entry body=" + responseBody );
-		} finally {
-			res.release();
-		}
-	}
-	
-	protected String readResponse( Reader responseReader ) {
-		if ( responseReader == null ) return ""; 
-		StringBuffer sb = new StringBuffer(1024);
-		try {
-			int charValue = 0;
-			while ((charValue = responseReader.read()) != -1) {
-				//result = result + (char) charValue;
-				sb.append((char)charValue);
-			}
-		} catch ( IOException e ) {
-		}
-		return sb.toString();
-	}
+    @BeforeClass
+    public static void init() throws Exception {
+        System.out.println(">>>ContentNegotiationTest.init");
+        String contribution = ContributionLocationHelper.getContributionLocation(AtomDeleteTestCase.class);
+        providerNode = NodeFactory.newInstance().createNode(
+                                                               "org/apache/tuscany/sca/binding/atom/Provider.composite", new Contribution("provider", contribution));
+        providerNode.start();
+        abdera = new Abdera();
+        client = new AbderaClient(abdera);
+        abderaParser = Abdera.getNewParser();
+    }
+
+    @AfterClass
+    public static void destroy() throws Exception {
+        System.out.println(">>>ContentNegotiationTest.destroy");
+        providerNode.stop();
+        providerNode.destroy();
+    }
+
+    @Test
+    public void testPrelim() throws Exception {
+        Assert.assertNotNull(providerNode);
+        Assert.assertNotNull(client);
+    }
+
+    @Test
+    public void testPost() throws Exception {
+        System.out.println(">>>ContentNegotiationTest.testPost");
+        // Testing of entry creation
+        Factory factory = abdera.getFactory();
+        String customerName = "Fred Farkle";
+        Entry entry = factory.newEntry();
+        entry.setTitle("customer " + customerName);
+        entry.setUpdated(new Date());
+        entry.addAuthor("Apache Tuscany");
+        // ID created by collection.
+        Content content = abdera.getFactory().newContent();
+        content.setContentType(Content.Type.TEXT);
+        content.setValue(customerName);
+        entry.setContentElement(content);
+
+        RequestOptions opts = new RequestOptions();
+        final String contentType = "application/atom+xml; type=entry";
+        opts.setContentType(contentType);
+        // AtomTestCaseUtils.printRequestHeaders( "Post request headers", "   ",
+        // opts );
+        IRI colUri = new IRI(providerURI).resolve("customer");
+        // res = client.post(colUri.toString() + "?test=foo", entry, opts);
+        ClientResponse res = client.post(colUri.toString(), entry, opts);
+
+        // Assert response status code is 201-OK.
+        // Assert response header Content-Type: application/atom+xml;
+        // charset=UTF-8
+        Assert.assertEquals(201, res.getStatus());
+        String returnedContentType = res.getContentType().toString().trim();
+        Assert.assertEquals(contentType, returnedContentType);
+
+        String eTag = res.getHeader("ETag");
+        if (eTag != null)
+            lastId = eTag.substring(1, eTag.length() - 1);
+
+        // AtomTestCaseUtils.printResponseHeaders(
+        // "Entry post response headers:", "   ", res );
+        // System.out.println("Entry post response content:");
+        // AtomTestCaseUtils.prettyPrint(abdera, res.getDocument());
+    }
+
+    @Test
+    public void testXMLEntryGet() throws Exception {
+        System.out.println(">>>ContentNegotiationTest.testXMLEntryGet");
+        RequestOptions opts = new RequestOptions();
+        opts.setHeader("Accept", "application/atom+xml");
+
+        IRI colUri = new IRI(providerURI).resolve("customer");
+        ClientResponse res = client.get(colUri.toString() + "/" + lastId, opts);
+        Assert.assertEquals(200, res.getStatus());
+        String returnedContentType = res.getContentType().toString().trim();
+        // Assert.assertEquals(contentType, returnedContentType );
+        res.release();
+    }
+
+    @Test
+    public void testJSONEntryGet() throws Exception {
+        System.out.println(">>>ContentNegotiationTest.testJSONEntryGet");
+        RequestOptions opts = new RequestOptions();
+        opts.setHeader("Accept", "application/json");
+
+        IRI colUri = new IRI(providerURI).resolve("customer");
+        ClientResponse res = client.get(colUri.toString() + "/" + lastId, opts);
+        try {
+            Assert.assertEquals(200, res.getStatus());
+            // Abdera 0.4 throws exception on getContentType with
+            // application/json.
+            // System.out.println(
+            // "ContentNegotiationTest.testJSONEntryGet contentType=" +
+            // res.getContentType());
+            String contentType = res.getHeader("Content-Type");
+            Assert.assertTrue(-1 < contentType.indexOf("application/json"));
+            // Following is a poor man's JSONObject test to avoid dependency on
+            // JSON libs.
+            // JSONObject jsonResp = new JSONObject(res.);
+            // Assert.assertEquals(12345, jsonResp.getInt("result"));
+            String responseBody = readResponse(res.getReader());
+            Assert.assertTrue(responseBody.startsWith("{"));
+            Assert.assertTrue(responseBody.endsWith("}"));
+            Assert.assertTrue(-1 < responseBody.indexOf("\"id\""));
+            Assert.assertTrue(-1 < responseBody.indexOf("\"title\""));
+            Assert.assertTrue(-1 < responseBody.indexOf("\"updated\""));
+            // AtomTestCaseUtils.printResponseHeaders(
+            // "JSON Entry response headers:", "   ", res );
+            // System.out.println(
+            // "ContentNegotiationTest.testJSONEntryGet JSON entry body=" +
+            // responseBody );
+        } finally {
+            res.release();
+        }
+    }
+
+    @Test
+    public void testXMLFeedGet() throws Exception {
+        System.out.println(">>>ContentNegotiationTest.testXMLFeedGet");
+        RequestOptions opts = new RequestOptions();
+        opts.setHeader("Accept", "application/atom+xml");
+
+        // Atom feed request
+        ClientResponse res = client.get(providerURI, opts);
+        Assert.assertNotNull(res);
+        try {
+            // Asser feed provided since no predicates
+            Assert.assertEquals(200, res.getStatus());
+            Assert.assertEquals(ResponseType.SUCCESS, res.getType());
+            // AtomTestCaseUtils.printResponseHeaders( "Feed response headers:",
+            // "   ", res );
+            // System.out.println("Feed response content:");
+            // AtomTestCaseUtils.prettyPrint(abdera, res.getDocument());
+
+            // Perform other tests on feed.
+            Document<Feed> doc = res.getDocument();
+            Assert.assertNotNull(doc);
+            Feed feed = doc.getRoot();
+            Assert.assertNotNull(feed);
+            // RFC 4287 requires non-null id, title, updated elements
+            Assert.assertNotNull(feed.getId());
+            Assert.assertNotNull(feed.getTitle());
+            Assert.assertNotNull(feed.getUpdated());
+            // AtomTestCaseUtils.printFeed( "Feed values", "   ", feed );
+        } finally {
+            res.release();
+        }
+    }
+
+    @Test
+    public void testJSONFeedGet() throws Exception {
+        System.out.println(">>>ContentNegotiationTest.testJSONFeedGet");
+        RequestOptions opts = new RequestOptions();
+        opts.setHeader("Accept", "application/json");
+
+        // JSON feed request
+        ClientResponse res = client.get(providerURI, opts);
+        Assert.assertNotNull(res);
+        try {
+            // Assert feed provided since no predicates
+            Assert.assertEquals(200, res.getStatus());
+            // Abdera 0.4 throws exception on getContentType with
+            // application/json.
+            // System.out.println(
+            // "ContentNegotiationTest.testJSONEntryGet contentType=" +
+            // res.getContentType());
+            String contentType = res.getHeader("Content-Type");
+            Assert.assertTrue(-1 < contentType.indexOf("application/json"));
+            // Following is a poor man's JSONObject test to avoid dependency on
+            // JSON libs.
+            // JSONObject jsonResp = new JSONObject(res.);
+            // Assert.assertEquals(12345, jsonResp.getInt("result"));
+            String responseBody = readResponse(res.getReader());
+            Assert.assertTrue(responseBody.startsWith("{"));
+            Assert.assertTrue(responseBody.endsWith("}"));
+            Assert.assertTrue(-1 < responseBody.indexOf("\"id\""));
+            Assert.assertTrue(-1 < responseBody.indexOf("\"title\""));
+            Assert.assertTrue(-1 < responseBody.indexOf("\"updated\""));
+            Assert.assertTrue(-1 < responseBody.indexOf("\"entries\""));
+            // AtomTestCaseUtils.printResponseHeaders(
+            // "JSON Entry response headers:", "   ", res );
+            // System.out.println(
+            // "ContentNegotiationTest.testJSONEntryGet JSON entry body=" +
+            // responseBody );
+        } finally {
+            res.release();
+        }
+    }
+
+    protected String readResponse(Reader responseReader) {
+        if (responseReader == null)
+            return "";
+        StringBuffer sb = new StringBuffer(1024);
+        try {
+            int charValue = 0;
+            while ((charValue = responseReader.read()) != -1) {
+                // result = result + (char) charValue;
+                sb.append((char)charValue);
+            }
+        } catch (IOException e) {
+        }
+        return sb.toString();
+    }
 }

Modified: tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/Provider.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/Provider.java?rev=703068&r1=703067&r2=703068&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/Provider.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/Provider.java Wed Oct  8 23:33:54 2008
@@ -21,13 +21,19 @@
 
 import java.io.IOException;
 
-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 Provider {
 
     public static void main(String[] args) {
 
-        SCADomain scaDomain = SCADomain.newInstance("org/apache/tuscany/sca/binding/atom/Provider.composite");
+        String contribution = ContributionLocationHelper.getContributionLocation(AtomDeleteTestCase.class);
+        Node node = NodeFactory.newInstance().createNode(
+                                                               "org/apache/tuscany/sca/binding/atom/Provider.composite", new Contribution("provider", contribution));
+        node.start();
         System.out.println("Provider.composite ready...");
 
         try {
@@ -36,6 +42,7 @@
             e.printStackTrace();
         }
 
-        scaDomain.close();
+        node.stop();
+        node.destroy();
     }
 }



Mime
View raw message