diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-09 06:33:54 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-09 06:33:54 +0000 |
commit | efe3363a815a777ecd283928900404dea84a7e1f (patch) | |
tree | 42522fd01e6af981f8ff94663d911d56744154d5 /branches/sca-equinox/vtest/java-api | |
parent | aacabe1650e380595a8d701123394d791656d17d (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/vtest/java-api')
2 files changed, 40 insertions, 40 deletions
diff --git a/branches/sca-equinox/vtest/java-api/annotations/destroy/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/DestroyAnnotationTestCase.java b/branches/sca-equinox/vtest/java-api/annotations/destroy/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/DestroyAnnotationTestCase.java index f3b2f28200..dba8072271 100644 --- a/branches/sca-equinox/vtest/java-api/annotations/destroy/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/DestroyAnnotationTestCase.java +++ b/branches/sca-equinox/vtest/java-api/annotations/destroy/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/DestroyAnnotationTestCase.java @@ -23,10 +23,10 @@ import java.io.File; import junit.framework.Assert; -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.junit.Test; import org.osoa.sca.ServiceRuntimeException; @@ -47,12 +47,12 @@ public class DestroyAnnotationTestCase { */ @Test public void atDestroyProper() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/proper/AService.composite").toURL().toString(), - new SCAContribution("TestContribution", + NodeFactory nodeFactory = NodeFactory.newInstance(); + Node node = nodeFactory.createNode(new File("src/main/resources/proper/AService.composite").toURL().toString(), + new Contribution("TestContribution", new File("src/main/resources/proper").toURL().toString())); node.start(); - AService aService = ((SCAClient)node).getService(AService.class, "AComponent"); + AService aService = ((Client)node).getService(AService.class, "AComponent"); Assert.assertEquals("Hello Pandu", aService.getGreetings("Pandu")); node.stop(); } @@ -69,10 +69,10 @@ public class DestroyAnnotationTestCase { */ @Test public void atDestroyProtectedMethod() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); + NodeFactory nodeFactory = NodeFactory.newInstance(); try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err1/AServiceErr1.composite").toURL().toString(), - new SCAContribution("TestContribution", + Node node = nodeFactory.createNode(new File("src/main/resources/err1/AServiceErr1.composite").toURL().toString(), + new Contribution("TestContribution", new File("src/main/resources/err1").toURL().toString())); Assert.fail(); node.stop(); @@ -94,10 +94,10 @@ public class DestroyAnnotationTestCase { */ @Test public void atDestroyPrivateMethod() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); + NodeFactory nodeFactory = NodeFactory.newInstance(); try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err2/AServiceErr2.composite").toURL().toString(), - new SCAContribution("TestContribution", + Node node = nodeFactory.createNode(new File("src/main/resources/err2/AServiceErr2.composite").toURL().toString(), + new Contribution("TestContribution", new File("src/main/resources/err2").toURL().toString())); Assert.fail(); node.stop(); @@ -119,10 +119,10 @@ public class DestroyAnnotationTestCase { */ @Test public void atDestroyNonVoidReturnType() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); + NodeFactory nodeFactory = NodeFactory.newInstance(); try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err3/AServiceErr3.composite").toURL().toString(), - new SCAContribution("TestContribution", + Node node = nodeFactory.createNode(new File("src/main/resources/err3/AServiceErr3.composite").toURL().toString(), + new Contribution("TestContribution", new File("src/main/resources/err3").toURL().toString())); Assert.fail(); node.stop(); @@ -144,10 +144,10 @@ public class DestroyAnnotationTestCase { */ @Test public void atDestroyMethodWithArgs() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); + NodeFactory nodeFactory = NodeFactory.newInstance(); try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err4/AServiceErr4.composite").toURL().toString(), - new SCAContribution("TestContribution", + Node node = nodeFactory.createNode(new File("src/main/resources/err4/AServiceErr4.composite").toURL().toString(), + new Contribution("TestContribution", new File("src/main/resources/err4").toURL().toString())); Assert.fail(); node.stop(); diff --git a/branches/sca-equinox/vtest/java-api/annotations/init/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/InitAnnotationTestCase.java b/branches/sca-equinox/vtest/java-api/annotations/init/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/InitAnnotationTestCase.java index 0dbccd8611..32af7c2cbd 100644 --- a/branches/sca-equinox/vtest/java-api/annotations/init/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/InitAnnotationTestCase.java +++ b/branches/sca-equinox/vtest/java-api/annotations/init/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/InitAnnotationTestCase.java @@ -23,10 +23,10 @@ import java.io.File; import junit.framework.Assert; -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.junit.Test; import org.osoa.sca.ServiceRuntimeException; @@ -50,12 +50,12 @@ public class InitAnnotationTestCase { */ @Test public void atInitProper() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/proper/AService.composite").toURL().toString(), - new SCAContribution("TestContribution", + NodeFactory nodeFactory = NodeFactory.newInstance(); + Node node = nodeFactory.createNode(new File("src/main/resources/proper/AService.composite").toURL().toString(), + new Contribution("TestContribution", new File("src/main/resources/proper").toURL().toString())); node.start(); - AService aService = ((SCAClient)node).getService(AService.class, "AComponent"); + AService aService = ((Client)node).getService(AService.class, "AComponent"); Assert.assertTrue(aService.isInitProper()); Assert.assertEquals("Hello Pandu", aService.getGreetings("Pandu")); node.stop(); @@ -74,10 +74,10 @@ public class InitAnnotationTestCase { */ @Test public void atInitProtectedMethod() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); + NodeFactory nodeFactory = NodeFactory.newInstance(); try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err1/AServiceErr1.composite").toURL().toString(), - new SCAContribution("TestContribution", + Node node = nodeFactory.createNode(new File("src/main/resources/err1/AServiceErr1.composite").toURL().toString(), + new Contribution("TestContribution", new File("src/main/resources/err1").toURL().toString())); Assert.fail(); node.stop(); @@ -100,10 +100,10 @@ public class InitAnnotationTestCase { */ @Test public void atInitPrivateMethod() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); + NodeFactory nodeFactory = NodeFactory.newInstance(); try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err2/AServiceErr2.composite").toURL().toString(), - new SCAContribution("TestContribution", + Node node = nodeFactory.createNode(new File("src/main/resources/err2/AServiceErr2.composite").toURL().toString(), + new Contribution("TestContribution", new File("src/main/resources/err2").toURL().toString())); Assert.fail(); node.stop(); @@ -126,10 +126,10 @@ public class InitAnnotationTestCase { */ @Test public void atInitNonVoidReturnType() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); + NodeFactory nodeFactory = NodeFactory.newInstance(); try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err3/HelloWorldErr3.composite").toURL().toString(), - new SCAContribution("TestContribution", + Node node = nodeFactory.createNode(new File("src/main/resources/err3/HelloWorldErr3.composite").toURL().toString(), + new Contribution("TestContribution", new File("src/main/resources/err3").toURL().toString())); Assert.fail(); node.stop(); @@ -152,10 +152,10 @@ public class InitAnnotationTestCase { */ @Test public void atInitMethodWithArgs() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); + NodeFactory nodeFactory = NodeFactory.newInstance(); try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err4/HelloWorldErr4.composite").toURL().toString(), - new SCAContribution("TestContribution", + Node node = nodeFactory.createNode(new File("src/main/resources/err4/HelloWorldErr4.composite").toURL().toString(), + new Contribution("TestContribution", new File("src/main/resources/err4").toURL().toString())); Assert.fail(); node.stop(); |