wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r815582 - in /incubator/wink/trunk/wink-itests/wink-itest: wink-itest-client/ wink-itest-client/src/main/java/org/apache/wink/itest/echoapp/ wink-itest-client/src/test/java/org/apache/wink/itest/client/ wink-itest-targeting/ wink-itest-targ...
Date Wed, 16 Sep 2009 01:19:58 GMT
Author: bluk
Date: Wed Sep 16 01:19:57 2009
New Revision: 815582

URL: http://svn.apache.org/viewvc?rev=815582&view=rev
Log:
Update integration tests for JSON changes

Modified:
    incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/pom.xml
    incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/main/java/org/apache/wink/itest/echoapp/EchoApplication.java
    incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/AcceptHeaderHandlerApacheHTTPCoreTest.java
    incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/AcceptHeaderHandlerTest.java
    incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/NoAcceptHeaderHandlerApacheHTTPCoreTest.java
    incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/NoAcceptHeaderHandlerTest.java
    incubator/wink/trunk/wink-itests/wink-itest/wink-itest-targeting/pom.xml
    incubator/wink/trunk/wink-itests/wink-itest/wink-itest-targeting/src/main/java/org/apache/wink/itest/contentnegotiation/Application.java

Modified: incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/pom.xml
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/pom.xml?rev=815582&r1=815581&r2=815582&view=diff
==============================================================================
--- incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/pom.xml (original)
+++ incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/pom.xml Wed Sep 16 01:19:57
2009
@@ -29,4 +29,11 @@
     <artifactId>wink-itest-client</artifactId>
     <packaging>war</packaging>
     <name>Apache Wink Integration Client Tests</name>
+    <dependencies>
+        <dependency>
+            <artifactId>wink-json-provider</artifactId>
+            <groupId>org.apache.wink</groupId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
 </project>

Modified: incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/main/java/org/apache/wink/itest/echoapp/EchoApplication.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/main/java/org/apache/wink/itest/echoapp/EchoApplication.java?rev=815582&r1=815581&r2=815582&view=diff
==============================================================================
--- incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/main/java/org/apache/wink/itest/echoapp/EchoApplication.java
(original)
+++ incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/main/java/org/apache/wink/itest/echoapp/EchoApplication.java
Wed Sep 16 01:19:57 2009
@@ -24,6 +24,8 @@
 
 import javax.ws.rs.core.Application;
 
+import org.apache.wink.providers.json.internal.JsonProvider;
+
 
 public class EchoApplication extends Application {
 
@@ -31,6 +33,7 @@
     public Set<Class<?>> getClasses() {
         Set<Class<?>> classes = new HashSet<Class<?>>();
         classes.add(EchoResource.class);
+        classes.add(JsonProvider.class);
         return classes;
     }
 

Modified: incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/AcceptHeaderHandlerApacheHTTPCoreTest.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/AcceptHeaderHandlerApacheHTTPCoreTest.java?rev=815582&r1=815581&r2=815582&view=diff
==============================================================================
--- incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/AcceptHeaderHandlerApacheHTTPCoreTest.java
(original)
+++ incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/AcceptHeaderHandlerApacheHTTPCoreTest.java
Wed Sep 16 01:19:57 2009
@@ -18,8 +18,14 @@
  */
 package org.apache.wink.itest.client;
 
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.ws.rs.core.Application;
+
 import org.apache.wink.client.ApacheHttpClientConfig;
 import org.apache.wink.client.RestClient;
+import org.apache.wink.providers.json.internal.JsonProvider;
 
 /**
  * Tests the Accept Header Handler. Repeats the {@link AcceptHeaderHandlerTest}
@@ -29,7 +35,16 @@
 
     public void setUp() throws Exception {
         super.setUp();
-        client = new RestClient(new ApacheHttpClientConfig());
+        client = new RestClient(new ApacheHttpClientConfig().applications(new Application()
{
+
+            @Override
+            public Set<Class<?>> getClasses() {
+                Set<Class<?>> classes = new HashSet<Class<?>>();
+                classes.add(JsonProvider.class);
+                return classes;
+            }
+
+        }));
     }
 
 }

Modified: incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/AcceptHeaderHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/AcceptHeaderHandlerTest.java?rev=815582&r1=815581&r2=815582&view=diff
==============================================================================
--- incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/AcceptHeaderHandlerTest.java
(original)
+++ incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/AcceptHeaderHandlerTest.java
Wed Sep 16 01:19:57 2009
@@ -20,17 +20,22 @@
 package org.apache.wink.itest.client;
 
 import java.io.StringReader;
+import java.util.HashSet;
+import java.util.Set;
 
+import javax.ws.rs.core.Application;
 import javax.ws.rs.core.MediaType;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBException;
 
 import junit.framework.TestCase;
 
+import org.apache.wink.client.ClientConfig;
 import org.apache.wink.client.ClientResponse;
 import org.apache.wink.client.RestClient;
 import org.apache.wink.client.internal.handlers.AcceptHeaderHandler;
 import org.apache.wink.itest.client.jaxb.Echo;
+import org.apache.wink.providers.json.internal.JsonProvider;
 import org.apache.wink.test.integration.ServerEnvironmentInfo;
 import org.json.JSONException;
 import org.json.JSONObject;
@@ -50,7 +55,16 @@
 
     public void setUp() throws Exception {
         super.setUp();
-        client = new RestClient();
+        client = new RestClient(new ClientConfig().applications(new Application() {
+
+            @Override
+            public Set<Class<?>> getClasses() {
+                Set<Class<?>> classes = new HashSet<Class<?>>();
+                classes.add(JsonProvider.class);
+                return classes;
+            }
+
+        }));
     }
 
     /**

Modified: incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/NoAcceptHeaderHandlerApacheHTTPCoreTest.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/NoAcceptHeaderHandlerApacheHTTPCoreTest.java?rev=815582&r1=815581&r2=815582&view=diff
==============================================================================
--- incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/NoAcceptHeaderHandlerApacheHTTPCoreTest.java
(original)
+++ incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/NoAcceptHeaderHandlerApacheHTTPCoreTest.java
Wed Sep 16 01:19:57 2009
@@ -18,17 +18,34 @@
  */
 package org.apache.wink.itest.client;
 
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.ws.rs.core.Application;
+
 import org.apache.wink.client.ApacheHttpClientConfig;
 import org.apache.wink.client.ClientResponse;
 import org.apache.wink.client.RestClient;
 import org.apache.wink.client.internal.handlers.AcceptHeaderHandler;
+import org.apache.wink.providers.json.internal.JsonProvider;
 
 public class NoAcceptHeaderHandlerApacheHTTPCoreTest extends NoAcceptHeaderHandlerTest {
 
     @Override
     public void setUp() throws Exception {
         super.setUp();
-        client = new RestClient(new ApacheHttpClientConfig().acceptHeaderAutoSet(false));
+        client =
+            new RestClient(new ApacheHttpClientConfig().acceptHeaderAutoSet(false)
+                .applications(new Application() {
+
+                    @Override
+                    public Set<Class<?>> getClasses() {
+                        Set<Class<?>> classes = new HashSet<Class<?>>();
+                        classes.add(JsonProvider.class);
+                        return classes;
+                    }
+
+                }));
     }
 
     /**
@@ -50,7 +67,8 @@
     public void testAcceptHeaderNoEntity() {
         ClientResponse resp = client.resource(getBaseURI() + "/echoaccept").get();
         /*
-         * in this case the underlying client does not set an Accept header at all
+         * in this case the underlying client does not set an Accept header at
+         * all
          */
         assertEquals("echo: ", resp.getEntity(String.class));
     }

Modified: incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/NoAcceptHeaderHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/NoAcceptHeaderHandlerTest.java?rev=815582&r1=815581&r2=815582&view=diff
==============================================================================
--- incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/NoAcceptHeaderHandlerTest.java
(original)
+++ incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/test/java/org/apache/wink/itest/client/NoAcceptHeaderHandlerTest.java
Wed Sep 16 01:19:57 2009
@@ -19,7 +19,10 @@
 package org.apache.wink.itest.client;
 
 import java.io.StringReader;
+import java.util.HashSet;
+import java.util.Set;
 
+import javax.ws.rs.core.Application;
 import javax.ws.rs.core.MediaType;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBException;
@@ -31,6 +34,7 @@
 import org.apache.wink.client.RestClient;
 import org.apache.wink.client.internal.handlers.AcceptHeaderHandler;
 import org.apache.wink.itest.client.jaxb.Echo;
+import org.apache.wink.providers.json.internal.JsonProvider;
 import org.apache.wink.test.integration.ServerEnvironmentInfo;
 import org.json.JSONException;
 import org.json.JSONObject;
@@ -51,7 +55,18 @@
     @Override
     public void setUp() throws Exception {
         super.setUp();
-        client = new RestClient(new ClientConfig().acceptHeaderAutoSet(false));
+        client =
+            new RestClient(new ClientConfig().acceptHeaderAutoSet(false)
+                .applications(new Application() {
+
+                    @Override
+                    public Set<Class<?>> getClasses() {
+                        Set<Class<?>> classes = new HashSet<Class<?>>();
+                        classes.add(JsonProvider.class);
+                        return classes;
+                    }
+
+                }));
     }
 
     /**

Modified: incubator/wink/trunk/wink-itests/wink-itest/wink-itest-targeting/pom.xml
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-itests/wink-itest/wink-itest-targeting/pom.xml?rev=815582&r1=815581&r2=815582&view=diff
==============================================================================
--- incubator/wink/trunk/wink-itests/wink-itest/wink-itest-targeting/pom.xml (original)
+++ incubator/wink/trunk/wink-itests/wink-itest/wink-itest-targeting/pom.xml Wed Sep 16 01:19:57
2009
@@ -27,4 +27,11 @@
     <artifactId>wink-itest-targeting</artifactId>
     <packaging>war</packaging>
     <name>Apache Wink Integration Targeting Tests</name>
+    <dependencies>
+        <dependency>
+            <artifactId>wink-json-provider</artifactId>
+            <groupId>org.apache.wink</groupId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
 </project>

Modified: incubator/wink/trunk/wink-itests/wink-itest/wink-itest-targeting/src/main/java/org/apache/wink/itest/contentnegotiation/Application.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-itests/wink-itest/wink-itest-targeting/src/main/java/org/apache/wink/itest/contentnegotiation/Application.java?rev=815582&r1=815581&r2=815582&view=diff
==============================================================================
--- incubator/wink/trunk/wink-itests/wink-itest/wink-itest-targeting/src/main/java/org/apache/wink/itest/contentnegotiation/Application.java
(original)
+++ incubator/wink/trunk/wink-itests/wink-itest/wink-itest-targeting/src/main/java/org/apache/wink/itest/contentnegotiation/Application.java
Wed Sep 16 01:19:57 2009
@@ -22,11 +22,18 @@
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.wink.providers.json.internal.JsonArrayProvider;
+import org.apache.wink.providers.json.internal.JsonJAXBProvider;
+import org.apache.wink.providers.json.internal.JsonProvider;
+
 public class Application extends javax.ws.rs.core.Application {
 
     public Set<Class<?>> getClasses() {
         Set<Class<?>> set = new HashSet<Class<?>>();
         set.add(CustomerService.class);
+        set.add(JsonProvider.class);
+        set.add(JsonArrayProvider.class);
+        set.add(JsonJAXBProvider.class);
         return set;
     }
 



Mime
View raw message