diff options
Diffstat (limited to 'sca-java-2.x/trunk/itest')
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 |