tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lrese...@apache.org
Subject svn commit: r799775 - in /tuscany/branches/sca-java-1.x/itest/atom: pom.xml src/main/java/test/abdera/impl/NewsServiceImpl.java src/test/java/test/abdera/NewsServiceTestCase.java src/test/resources/news/news.composite
Date Sat, 01 Aug 2009 00:07:04 GMT
Author: lresende
Date: Sat Aug  1 00:07:03 2009
New Revision: 799775

URL: http://svn.apache.org/viewvc?rev=799775&view=rev
Log:
TUSCANY-3166 - Making the test case works using the generated java interface

Modified:
    tuscany/branches/sca-java-1.x/itest/atom/pom.xml
    tuscany/branches/sca-java-1.x/itest/atom/src/main/java/test/abdera/impl/NewsServiceImpl.java
    tuscany/branches/sca-java-1.x/itest/atom/src/test/java/test/abdera/NewsServiceTestCase.java
    tuscany/branches/sca-java-1.x/itest/atom/src/test/resources/news/news.composite

Modified: tuscany/branches/sca-java-1.x/itest/atom/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/itest/atom/pom.xml?rev=799775&r1=799774&r2=799775&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/itest/atom/pom.xml (original)
+++ tuscany/branches/sca-java-1.x/itest/atom/pom.xml Sat Aug  1 00:07:03 2009
@@ -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>

Modified: tuscany/branches/sca-java-1.x/itest/atom/src/main/java/test/abdera/impl/NewsServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/itest/atom/src/main/java/test/abdera/impl/NewsServiceImpl.java?rev=799775&r1=799774&r2=799775&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/itest/atom/src/main/java/test/abdera/impl/NewsServiceImpl.java
(original)
+++ tuscany/branches/sca-java-1.x/itest/atom/src/main/java/test/abdera/impl/NewsServiceImpl.java
Sat Aug  1 00:07:03 2009
@@ -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 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 {

Modified: tuscany/branches/sca-java-1.x/itest/atom/src/test/java/test/abdera/NewsServiceTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/itest/atom/src/test/java/test/abdera/NewsServiceTestCase.java?rev=799775&r1=799774&r2=799775&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/itest/atom/src/test/java/test/abdera/NewsServiceTestCase.java
(original)
+++ tuscany/branches/sca-java-1.x/itest/atom/src/test/java/test/abdera/NewsServiceTestCase.java
Sat Aug  1 00:07:03 2009
@@ -49,19 +49,7 @@
 	    @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

Modified: tuscany/branches/sca-java-1.x/itest/atom/src/test/resources/news/news.composite
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/itest/atom/src/test/resources/news/news.composite?rev=799775&r1=799774&r2=799775&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/itest/atom/src/test/resources/news/news.composite (original)
+++ tuscany/branches/sca-java-1.x/itest/atom/src/test/resources/news/news.composite Sat Aug
 1 00:07:03 2009
@@ -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> 



Mime
View raw message