summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.5.1
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-07-31 23:41:35 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-07-31 23:41:35 +0000
commit7624b12ac7bad40e6fc8b810addc65f9fba1bd0e (patch)
tree60261b8f83259f5be23c1fc4c19efb0b7c1393df /branches/sca-java-1.5.1
parentb029a4016074bd535a0f2aa5277bdb03bad06921 (diff)
TUSCANY-3166 - Making the test case works using the generated java interface
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@799771 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.5.1')
-rw-r--r--branches/sca-java-1.5.1/itest/atom/pom.xml12
-rw-r--r--branches/sca-java-1.5.1/itest/atom/src/main/java/test/abdera/impl/NewsServiceImpl.java7
-rw-r--r--branches/sca-java-1.5.1/itest/atom/src/test/java/test/abdera/NewsServiceTestCase.java14
-rw-r--r--branches/sca-java-1.5.1/itest/atom/src/test/resources/news/news.composite2
4 files changed, 18 insertions, 17 deletions
diff --git a/branches/sca-java-1.5.1/itest/atom/pom.xml b/branches/sca-java-1.5.1/itest/atom/pom.xml
index a46ca17109..4e100de74f 100644
--- a/branches/sca-java-1.5.1/itest/atom/pom.xml
+++ b/branches/sca-java-1.5.1/itest/atom/pom.xml
@@ -62,7 +62,15 @@
<version>1.5.1-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
-
+
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-tomcat</artifactId>
+ <version>1.5.1-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
<dependency>
<groupId>org.apache.tuscany.sdo</groupId>
<artifactId>tuscany-sdo-impl</artifactId>
@@ -161,7 +169,7 @@
<executions>
<execution>
<id>wsimport</id>
- <phase>generate-test-sources</phase>
+ <phase>generate-sources</phase>
<goals>
<goal>wsimport</goal>
</goals>
diff --git a/branches/sca-java-1.5.1/itest/atom/src/main/java/test/abdera/impl/NewsServiceImpl.java b/branches/sca-java-1.5.1/itest/atom/src/main/java/test/abdera/impl/NewsServiceImpl.java
index 7d1b6e4347..09789b4bb5 100644
--- a/branches/sca-java-1.5.1/itest/atom/src/main/java/test/abdera/impl/NewsServiceImpl.java
+++ b/branches/sca-java-1.5.1/itest/atom/src/main/java/test/abdera/impl/NewsServiceImpl.java
@@ -1,5 +1,6 @@
package test.abdera.impl;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -28,7 +29,11 @@ public class NewsServiceImpl implements NewsService {
}
public List<Entry> getAll() {
- return (List<Entry>) collection.values();
+ List<Entry> entries = new ArrayList<Entry>();
+ for(Entry entry : collection.values()) {
+ entries.add(entry);
+ }
+ return entries;
}
public Item get(String arg0) throws NotFoundException_Exception {
diff --git a/branches/sca-java-1.5.1/itest/atom/src/test/java/test/abdera/NewsServiceTestCase.java b/branches/sca-java-1.5.1/itest/atom/src/test/java/test/abdera/NewsServiceTestCase.java
index 0d9c1c11b3..9e1b9bdcec 100644
--- a/branches/sca-java-1.5.1/itest/atom/src/test/java/test/abdera/NewsServiceTestCase.java
+++ b/branches/sca-java-1.5.1/itest/atom/src/test/java/test/abdera/NewsServiceTestCase.java
@@ -49,19 +49,7 @@ public class NewsServiceTestCase {
@Test
public void testPing() throws Exception {
new Socket("127.0.0.1", 8085);
- System.in.read();
- }
-
- @Test
- public void testNewsServicesGetAll() throws Exception {
- List<Entry> entries = newsService.getAll();
-
- Assert.assertNotNull(entries);
- Assert.assertTrue(entries.size() > 0);
-
- for(Entry entry : entries) {
- System.out.println(">>> Entry - " + ((Item)entry.getData()).getTitle());
- }
+ //System.in.read();
}
@Test
diff --git a/branches/sca-java-1.5.1/itest/atom/src/test/resources/news/news.composite b/branches/sca-java-1.5.1/itest/atom/src/test/resources/news/news.composite
index f3a3b165cc..7370bb14bb 100644
--- a/branches/sca-java-1.5.1/itest/atom/src/test/resources/news/news.composite
+++ b/branches/sca-java-1.5.1/itest/atom/src/test/resources/news/news.composite
@@ -26,7 +26,7 @@
<component name="NewsServiceComponent">
<implementation.java class="test.abdera.impl.NewsServiceImpl"/>
<service name="NewsService">
- <interface.wsdl interface="http://abdera.test/#wsdl.interface(NewsService)"/>
+ <!--interface.wsdl interface="http://abdera.test/#wsdl.interface(NewsService)"/-->
<tuscany:binding.atom uri="http://localhost:8085/NewsService"/>
</service>
</component>