summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/itest/implementation-spring/src/test/java
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-02-09 21:46:04 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-02-09 21:46:04 +0000
commit36072114b7e9e4fad507ec60443b5fc40d670d39 (patch)
treedecb0a08f19a4d575ee4c333c6ed01a59a5aa1b9 /sca-java-2.x/trunk/itest/implementation-spring/src/test/java
parentdd6a6ba5665f09da2f3a70bcb8af7bc88b4684e0 (diff)
Remove org.apache.tuscany.sca.node.Client and merge the methods into org.apache.tuscany.sca.node.Node
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@908245 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/itest/implementation-spring/src/test/java')
-rw-r--r--sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java7
-rw-r--r--sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java6
-rw-r--r--sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java2
-rw-r--r--sca-java-2.x/trunk/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java7
-rw-r--r--sca-java-2.x/trunk/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java6
-rw-r--r--sca-java-2.x/trunk/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java4
6 files changed, 15 insertions, 17 deletions
diff --git a/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java b/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java
index 4503294f10..a346e290b9 100644
--- a/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java
+++ b/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java
@@ -20,13 +20,12 @@
package context.access;
import java.io.File;
-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.Contribution;
import org.springframework.context.ApplicationContext;
-import context.access.SCAApplicationContextProvider;
import calculator.CalculatorService;
/**
@@ -47,7 +46,7 @@ public class CalculatorClient {
System.out.println("CalculatorServiceBean is now available for use...");
CalculatorService calculatorService =
- ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ node.getService(CalculatorService.class, "CalculatorServiceComponent");
System.out.println("3 + 2=" + calculatorService.add(3, 2));
System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
diff --git a/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java b/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java
index 254b8100e1..c029b06a8c 100644
--- a/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java
+++ b/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java
@@ -21,10 +21,10 @@ package context.imports;
import java.io.File;
-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.Contribution;
+
import calculator.CalculatorService;
/**
@@ -40,7 +40,7 @@ public class CalculatorClient {
node.start();
CalculatorService calculatorService =
- ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ node.getService(CalculatorService.class, "CalculatorServiceComponent");
System.out.println("3 + 2=" + calculatorService.add(3, 2));
System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
diff --git a/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java b/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java
index 9ff1b74567..83875e0b0a 100644
--- a/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java
+++ b/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java
@@ -21,10 +21,10 @@ package context.multiple;
import java.io.File;
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.springframework.context.ApplicationContext;
+
import context.access.SCAApplicationContextProvider;
/**
diff --git a/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java b/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java
index 8b12dd7af7..19892597c1 100644
--- a/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java
+++ b/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java
@@ -22,10 +22,11 @@ package implementation.policies;
import java.io.File;
import javax.security.auth.login.Configuration;
-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 calculator.CalculatorService;
@@ -48,7 +49,7 @@ public class CalculatorClient {
node.start();
CalculatorService calculatorService =
- ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ node.getService(CalculatorService.class, "CalculatorServiceComponent");
// Calculate
System.out.println("Calling CalculatorServiceComponent configured with 'logging' " +
@@ -59,7 +60,7 @@ public class CalculatorClient {
System.out.println("3 / 2=" + calculatorService.divide(3, 2));
calculatorService =
- ((Client)node).getService(CalculatorService.class, "AnotherCalculatorServiceComponent");
+ node.getService(CalculatorService.class, "AnotherCalculatorServiceComponent");
// Calculate
System.out.println("Calling CalculatorServiceComponent configured with 'logging' " +
diff --git a/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java b/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java
index 73b151bf7a..53cc094aca 100644
--- a/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java
+++ b/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java
@@ -20,12 +20,10 @@
package org.apache.tuscany.sca.itest.spring;
import java.io.File;
+
import junit.framework.TestCase;
-import java.net.MalformedURLException;
-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;
@@ -48,7 +46,7 @@ public abstract class AbstractSCATestCase<T> extends TestCase {
node = factory.createNode(new File("src/main/resources/" + contributionLocation + compositeName).toURI().toURL().toString(),
new Contribution("TestContribution", new File("src/main/resources/" + contributionLocation).toURI().toURL().toString()));
node.start();
- service = ((Client)node).getService(getServiceClass(), "ClientComponent");
+ service = node.getService(getServiceClass(), "ClientComponent");
}
abstract protected Class<T> getServiceClass();
diff --git a/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java b/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java
index 13b84c8c73..c2dfbf247f 100644
--- a/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java
+++ b/sca-java-2.x/trunk/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java
@@ -21,10 +21,10 @@ package spring.annotations;
import java.io.File;
-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 calculator.CalculatorService;
@@ -41,7 +41,7 @@ public class CalculatorClient {
node.start();
CalculatorService calculatorService =
- ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ node.getService(CalculatorService.class, "CalculatorServiceComponent");
System.out.println("3 + 2=" + calculatorService.add(3, 2));
System.out.println("3 - 2=" + calculatorService.subtract(3, 2));