summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/itest/recursive-multi-level
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-07-16 17:49:10 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-07-16 17:49:10 +0000
commit63cc1a8c2eb2116ce449456bde19ff6e282163df (patch)
treeb9f60a01c8642416c9d2121ef558e920a712675e /sca-java-2.x/trunk/itest/recursive-multi-level
parent06891b50bded21d24be8abce7cbd5035f2bb6e61 (diff)
Fix for TUSCANY-3622
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@964879 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/itest/recursive-multi-level')
-rw-r--r--sca-java-2.x/trunk/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java2
-rw-r--r--sca-java-2.x/trunk/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java7
-rw-r--r--sca-java-2.x/trunk/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite1
-rw-r--r--sca-java-2.x/trunk/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java4
4 files changed, 13 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java b/sca-java-2.x/trunk/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java
index 261eff2584..a10a430473 100644
--- a/sca-java-2.x/trunk/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java
+++ b/sca-java-2.x/trunk/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java
@@ -23,4 +23,6 @@ public interface MySimpleTotalService {
String getLocation();
String getYear();
+
+ String getYear2();
}
diff --git a/sca-java-2.x/trunk/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java b/sca-java-2.x/trunk/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java
index f3c9280f96..d00b016e34 100644
--- a/sca-java-2.x/trunk/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java
+++ b/sca-java-2.x/trunk/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java
@@ -27,6 +27,9 @@ public class MySimpleTotalServiceImpl implements MySimpleTotalService {
// default required==true so it is 1:1
@Reference
public MyService myService;
+
+ @Reference
+ private MyService myService2;
public String getLocation() {
return myService.getLocation();
@@ -35,5 +38,9 @@ public class MySimpleTotalServiceImpl implements MySimpleTotalService {
public String getYear() {
return myService.getYear();
}
+
+ public String getYear2() {
+ return myService2.getYear();
+ }
}
diff --git a/sca-java-2.x/trunk/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite b/sca-java-2.x/trunk/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite
index 146b8b4543..9ff53cca08 100644
--- a/sca-java-2.x/trunk/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite
+++ b/sca-java-2.x/trunk/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite
@@ -43,6 +43,7 @@
<component name="TotalServiceComponentLevel1Auto">
<implementation.java class="mysca.test.myservice.MySimpleTotalServiceImpl"/>
<reference name="myService" autowire="true"/>
+ <reference name="myService2" target="ServiceComponentLevel1Auto"/>
</component>
<reference name="myServiceReference1Auto" promote="TotalServiceComponentLevel1Auto/myService" multiplicity="1..1">
diff --git a/sca-java-2.x/trunk/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java b/sca-java-2.x/trunk/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java
index b9b4e3ba7c..2dc13c4f42 100644
--- a/sca-java-2.x/trunk/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java
+++ b/sca-java-2.x/trunk/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java
@@ -27,7 +27,6 @@ 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.Ignore;
import org.junit.Test;
/**
@@ -67,18 +66,21 @@ public class MultiLevelTestCase {
public void testLevel1() {
assertEquals("Level 1", myService1.getLocation());
assertEquals("2001", myService1.getYear());
+ assertEquals("2001", myService1.getYear2());
}
@Test
public void testLevel2() {
assertEquals("Default 2", myService2.getLocation());
assertEquals("1992", myService2.getYear());
+ assertEquals("2002", myService2.getYear2());
}
@Test
public void testLevel3() {
assertEquals("Default 3", myService3.getLocation());
assertEquals("1993", myService3.getYear());
+ assertEquals("2003", myService3.getYear2());
}
@AfterClass