summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-10-09 06:33:54 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-10-09 06:33:54 +0000
commitefe3363a815a777ecd283928900404dea84a7e1f (patch)
tree42522fd01e6af981f8ff94663d911d56744154d5 /branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java
parentaacabe1650e380595a8d701123394d791656d17d (diff)
Work in progress. Fixed implementation of NodeImpl, now working without dependencies on implementations from other bundles (except RuntimeAssemblyFactory, which will need to be cleaned up too). Started to remove dependencies on host-embedded and port code to NodeFactory and Node, as an interim step to bring them up, before porting them to the OSGi-enabled node launcher.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@703068 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java')
-rw-r--r--branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java30
1 files changed, 20 insertions, 10 deletions
diff --git a/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java b/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java
index 8d78d167c3..eaa2bc4a97 100644
--- a/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java
+++ b/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java
@@ -6,37 +6,47 @@ import org.apache.abdera.Abdera;
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);
}