diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-01 00:07:03 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-01 00:07:03 +0000 |
commit | 3cb53d994153049e04eafef840b712c7ed653c15 (patch) | |
tree | 0e06d5efe9c1da1d6cde1544aebafa2d9782b34c /branches/sca-java-1.x/itest | |
parent | 704be128887dcfa5963110985d14d939484cbc66 (diff) |
TUSCANY-3166 - Making the test case works using the generated java interface
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@799775 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
4 files changed, 18 insertions, 17 deletions
diff --git a/branches/sca-java-1.x/itest/atom/pom.xml b/branches/sca-java-1.x/itest/atom/pom.xml index a46ca17109..4e100de74f 100644 --- a/branches/sca-java-1.x/itest/atom/pom.xml +++ b/branches/sca-java-1.x/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.x/itest/atom/src/main/java/test/abdera/impl/NewsServiceImpl.java b/branches/sca-java-1.x/itest/atom/src/main/java/test/abdera/impl/NewsServiceImpl.java index 7d1b6e4347..09789b4bb5 100644 --- a/branches/sca-java-1.x/itest/atom/src/main/java/test/abdera/impl/NewsServiceImpl.java +++ b/branches/sca-java-1.x/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.x/itest/atom/src/test/java/test/abdera/NewsServiceTestCase.java b/branches/sca-java-1.x/itest/atom/src/test/java/test/abdera/NewsServiceTestCase.java index 0d9c1c11b3..9e1b9bdcec 100644 --- a/branches/sca-java-1.x/itest/atom/src/test/java/test/abdera/NewsServiceTestCase.java +++ b/branches/sca-java-1.x/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.x/itest/atom/src/test/resources/news/news.composite b/branches/sca-java-1.x/itest/atom/src/test/resources/news/news.composite index f3a3b165cc..7370bb14bb 100644 --- a/branches/sca-java-1.x/itest/atom/src/test/resources/news/news.composite +++ b/branches/sca-java-1.x/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> |