Skip to content

Commit

Permalink
git-svn-id: file:///Users/billburke/jboss/resteasy/resteasy-git/svn-s…
Browse files Browse the repository at this point in the history
…erver-sync/resteasy/trunk/jaxrs@1363 2b1ed4c4-5db3-0410-90e4-80a7a6204c25
  • Loading branch information
patriot1burke committed May 31, 2011
1 parent 6360a08 commit 4edb861
Showing 1 changed file with 38 additions and 0 deletions.
Expand Up @@ -12,7 +12,9 @@
import org.junit.BeforeClass;
import org.junit.Test;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
Expand Down Expand Up @@ -96,6 +98,42 @@ public String getObjJson()
return "{ \"name\" : \"bill\" }";
}

@Path("start")
@POST
@Produces("text/plain")
public String start()
{
return "started";
}

@Path("start")
@Consumes("application/xml")
@POST
@Produces("text/plain")
public String start(String xml)
{
return xml;
}

}

/**
* RESTEASY-549
*
* @throws Exception
*/
@Test
public void testEmpty() throws Exception
{
ClientRequest request = new ClientRequest(generateURL("/start"));
String rtn = request.postTarget(String.class);
Assert.assertEquals("started", rtn);

request = new ClientRequest(generateURL("/start"));
request.body("application/xml", "<xml/>");
rtn = request.postTarget(String.class);
Assert.assertEquals("<xml/>", rtn);

}

/**
Expand Down

0 comments on commit 4edb861

Please sign in to comment.