wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r816356 - in /incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src: main/java/org/apache/wink/itest/echoapp/ test/java/org/apache/wink/itest/client/
Date Thu, 17 Sep 2009 19:51:57 GMT
Author: bluk
Date: Thu Sep 17 19:51:56 2009
New Revision: 816356

URL: http://svn.apache.org/viewvc?rev=816356&view=rev
Log:
Use the client config to stop auto loading

Modified:
    incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/main/java/org/apache/wink/itest/echoapp/EchoResource.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

Modified: incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/main/java/org/apache/wink/itest/echoapp/EchoResource.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/EchoResource.java?rev=816356&r1=816355&r2=816356&view=diff
==============================================================================
--- incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/main/java/org/apache/wink/itest/echoapp/EchoResource.java
(original)
+++ incubator/wink/trunk/wink-itests/wink-itest/wink-itest-client/src/main/java/org/apache/wink/itest/echoapp/EchoResource.java
Thu Sep 17 19:51:56 2009
@@ -66,11 +66,11 @@
             if (MediaType.APPLICATION_JSON_TYPE.isCompatible(variant.getMediaType())) {
                 JSONObject jsonObject = new JSONObject();
                 jsonObject.put("value", sb.toString());
-                return Response.ok(jsonObject).build();
+                return Response.ok(jsonObject).type(MediaType.APPLICATION_JSON).build();
             } else if (MediaType.TEXT_XML_TYPE.isCompatible(variant.getMediaType())) {
                 Echo e = new Echo();
                 e.setValue(sb.toString());
-                return Response.ok(e).build();
+                return Response.ok(e).type(MediaType.TEXT_XML).build();
             }
         }
 

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=816356&r1=816355&r2=816356&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
Thu Sep 17 19:51:56 2009
@@ -24,6 +24,7 @@
 import javax.ws.rs.core.Application;
 
 import org.apache.wink.client.ApacheHttpClientConfig;
+import org.apache.wink.client.ClientConfig;
 import org.apache.wink.client.RestClient;
 import org.apache.wink.providers.json.JsonProvider;
 
@@ -35,7 +36,9 @@
 
     public void setUp() throws Exception {
         super.setUp();
-        client = new RestClient(new ApacheHttpClientConfig().applications(new Application()
{
+        ClientConfig config = new ApacheHttpClientConfig();
+        config.setLoadWinkApplications(false);
+        config.applications(new Application() {
 
             @Override
             public Set<Class<?>> getClasses() {
@@ -44,7 +47,8 @@
                 return classes;
             }
 
-        }));
+        });
+        client = new RestClient(config);
     }
 
 }

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=816356&r1=816355&r2=816356&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
Thu Sep 17 19:51:56 2009
@@ -30,6 +30,7 @@
 
 import junit.framework.TestCase;
 
+import org.apache.wink.client.ApacheHttpClientConfig;
 import org.apache.wink.client.ClientConfig;
 import org.apache.wink.client.ClientResponse;
 import org.apache.wink.client.RestClient;
@@ -55,7 +56,10 @@
 
     public void setUp() throws Exception {
         super.setUp();
-        client = new RestClient(new ClientConfig().applications(new Application() {
+
+        ClientConfig config = new ApacheHttpClientConfig();
+        config.setLoadWinkApplications(false);
+        config.applications(new Application() {
 
             @Override
             public Set<Class<?>> getClasses() {
@@ -64,7 +68,9 @@
                 return classes;
             }
 
-        }));
+        });
+
+        client = new RestClient(config);
     }
 
     /**



Mime
View raw message