Author: sergeyb
Date: Wed Dec 11 12:44:47 2013
New Revision: 1550127
URL: http://svn.apache.org/r1550127
Log:
[CXF-5447] Adding a test depending on the empty request property
Modified:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
Modified:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java?rev=1550127&r1=1550126&r2=1550127&view=diff
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
(original)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
Wed Dec 11 12:44:47 2013
@@ -19,6 +19,7 @@
package org.apache.cxf.systest.jaxrs;
+import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.InputStream;
import java.net.HttpURLConnection;
@@ -181,6 +182,16 @@ public class JAXRSClientServerBookTest e
}
@Test
+ public void testPostEmptyFormAsInStream() throws Exception {
+ String address = "http://localhost:" + PORT + "/bookstore/emptyform";
+ WebClient wc = WebClient.create(address);
+
WebClient.getConfig(wc).getRequestContext().put("org.apache.cxf.empty.request",
true);
+ wc.type(MediaType.APPLICATION_FORM_URLENCODED);
+ Response r = wc.post(new ByteArrayInputStream("".getBytes()));
+ assertEquals("empty form", r.readEntity(String.class));
+ }
+
+ @Test
public void testGetBookDescriptionHttpResponse() throws Exception {
String address = "http://localhost:" + PORT +
"/bookstore/httpresponse";
WebClient wc = WebClient.create(address);