Author: kono
Date: 2012-04-17 14:10:18 -0700 (Tue, 17 Apr 2012)
New Revision: 28863

Added:
   core3/api/trunk/webservice-api/src/test/java/org/cytoscape/webservice/client/
   
core3/api/trunk/webservice-api/src/test/java/org/cytoscape/webservice/client/AbstractClientTest.java
Modified:
   
core3/api/trunk/webservice-api/src/test/java/org/cytoscape/webservice/AbstractWebServiceClientTest.java
Log:
refs #864 Some unit tests had been added.

Modified: 
core3/api/trunk/webservice-api/src/test/java/org/cytoscape/webservice/AbstractWebServiceClientTest.java
===================================================================
--- 
core3/api/trunk/webservice-api/src/test/java/org/cytoscape/webservice/AbstractWebServiceClientTest.java
     2012-04-17 20:48:48 UTC (rev 28862)
+++ 
core3/api/trunk/webservice-api/src/test/java/org/cytoscape/webservice/AbstractWebServiceClientTest.java
     2012-04-17 21:10:18 UTC (rev 28863)
@@ -6,13 +6,13 @@
 
 import java.net.URI;
 
-import org.cytoscape.io.webservice.client.AbstractWebServiceClient;
+import org.cytoscape.io.webservice.WebServiceClient;
 import org.cytoscape.work.TaskIterator;
 import org.junit.Test;
 
 public abstract class AbstractWebServiceClientTest {
 
-       protected AbstractWebServiceClient client;
+       protected WebServiceClient client;
        protected URI locationUri;
        protected String displayName;
        protected String description;

Added: 
core3/api/trunk/webservice-api/src/test/java/org/cytoscape/webservice/client/AbstractClientTest.java
===================================================================
--- 
core3/api/trunk/webservice-api/src/test/java/org/cytoscape/webservice/client/AbstractClientTest.java
                                (rev 0)
+++ 
core3/api/trunk/webservice-api/src/test/java/org/cytoscape/webservice/client/AbstractClientTest.java
        2012-04-17 21:10:18 UTC (rev 28863)
@@ -0,0 +1,39 @@
+package org.cytoscape.webservice.client;
+
+import java.net.URI;
+
+import org.cytoscape.io.webservice.client.AbstractWebServiceClient;
+import org.cytoscape.webservice.AbstractWebServiceClientTest;
+import org.cytoscape.work.Task;
+import org.cytoscape.work.TaskIterator;
+import org.junit.Before;
+
+import static org.mockito.Mockito.*;
+
+public class AbstractClientTest extends AbstractWebServiceClientTest {
+
+       @Before
+       public void setUp() throws Exception {
+               final String uriString = 
"http://www.ebi.ac.uk/Tools/webservices/psicquic/registry/registry";;
+               this.locationUri = new URI(uriString);
+               this.description = "dummy client";
+               this.displayName = "dummy";
+               this.queryObject = "test query";
+               client = new DummyClient(uriString, displayName, description);
+       }
+       
+       private final class DummyClient extends AbstractWebServiceClient {
+
+               private Task mockTask = mock(Task.class);
+               
+               public DummyClient(String uri, String displayName, String 
description) {
+                       super(uri, displayName, description);
+               }
+
+               @Override
+               public TaskIterator createTaskIterator(Object query) {
+                       return new TaskIterator(mockTask);
+               }
+               
+       }
+}

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to