Commit dd29aeb7 authored by Andre Freyssinet's avatar Andre Freyssinet

JORAM-336: Temporary use old API.

parent 5bf7c83a
...@@ -86,8 +86,9 @@ public class ClientRESTSSL extends TestCase { ...@@ -86,8 +86,9 @@ public class ClientRESTSSL extends TestCase {
response = client.target(uriCreateProd) response = client.target(uriCreateProd)
.queryParam("user", "anonymous") .queryParam("user", "anonymous")
.queryParam("password", "anonymous") .queryParam("password", "anonymous")
.request().accept(MediaType.TEXT_PLAIN) .request().accept(MediaType.TEXT_PLAIN).post(null);
.post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED)); // TODO (AF):
// .post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED));
assertEquals("create-producer", 201, response.getStatus()); assertEquals("create-producer", 201, response.getStatus());
URI uriCloseProd = response.getLink("close-context").getUri(); URI uriCloseProd = response.getLink("close-context").getUri();
...@@ -104,8 +105,9 @@ public class ClientRESTSSL extends TestCase { ...@@ -104,8 +105,9 @@ public class ClientRESTSSL extends TestCase {
// Create the consumer // Create the consumer
response = client.target(uriCreateCons) response = client.target(uriCreateCons)
.request() .request()
.accept(MediaType.TEXT_PLAIN) .accept(MediaType.TEXT_PLAIN).post(null);
.post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED)); // TODO (AF):
// .post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED));
assertEquals("create-consumer", 201, response.getStatus()); assertEquals("create-consumer", 201, response.getStatus());
URI uriCloseCons = response.getLink("close-context").getUri(); URI uriCloseCons = response.getLink("close-context").getUri();
......
...@@ -72,8 +72,9 @@ public class ClientRESTTextMessage extends TestCase { ...@@ -72,8 +72,9 @@ public class ClientRESTTextMessage extends TestCase {
response = client.target(response.getLink("create-producer").getUri()) response = client.target(response.getLink("create-producer").getUri())
.request() .request()
.accept(MediaType.TEXT_PLAIN) .accept(MediaType.TEXT_PLAIN).post(null);
.post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED)); // TODO (AF):
// .post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED));
assertEquals("create-producer", 201, response.getStatus()); assertEquals("create-producer", 201, response.getStatus());
URI uriCloseProd = response.getLink("close-context").getUri(); URI uriCloseProd = response.getLink("close-context").getUri();
...@@ -95,8 +96,9 @@ public class ClientRESTTextMessage extends TestCase { ...@@ -95,8 +96,9 @@ public class ClientRESTTextMessage extends TestCase {
response = client.target(uriCreateCons) response = client.target(uriCreateCons)
.request() .request()
.accept(MediaType.TEXT_PLAIN) .accept(MediaType.TEXT_PLAIN).post(null);
.post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED)); // TODO (AF):
// .post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED));
assertEquals("create-consumer", 201, response.getStatus()); assertEquals("create-consumer", 201, response.getStatus());
URI uriCloseCons = response.getLink("close-context").getUri(); URI uriCloseCons = response.getLink("close-context").getUri();
......
...@@ -97,7 +97,9 @@ public class ClientRESTTransacted extends TestCase { ...@@ -97,7 +97,9 @@ public class ClientRESTTransacted extends TestCase {
URI prodTransacted = response.getLink("create-producer-transacted").getUri(); URI prodTransacted = response.getLink("create-producer-transacted").getUri();
response = client.target(prodTransacted) response = client.target(prodTransacted)
.queryParam("name", "prodTransacted") .queryParam("name", "prodTransacted")
.request().accept(MediaType.TEXT_PLAIN).post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED)); .request().accept(MediaType.TEXT_PLAIN).post(null);
// TODO (AF):
//.post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED));
assertEquals("create-producer-transacted", 201, response.getStatus()); assertEquals("create-producer-transacted", 201, response.getStatus());
URI uriCloseProd = response.getLink("close-context").getUri(); URI uriCloseProd = response.getLink("close-context").getUri();
...@@ -116,7 +118,9 @@ public class ClientRESTTransacted extends TestCase { ...@@ -116,7 +118,9 @@ public class ClientRESTTransacted extends TestCase {
URI sendNextMsg = response.getLink("send-next-message").getUri(); URI sendNextMsg = response.getLink("send-next-message").getUri();
// create a consumer // create a consumer
response = client.target(uriCreateCons).request().accept(MediaType.TEXT_PLAIN).post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED)); response = client.target(uriCreateCons).request().accept(MediaType.TEXT_PLAIN).post(null);
// TODO (AF):
//.post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED));
assertEquals("create-consumer", 201, response.getStatus()); assertEquals("create-consumer", 201, response.getStatus());
URI uriCloseCons = response.getLink("close-context").getUri(); URI uriCloseCons = response.getLink("close-context").getUri();
...@@ -197,7 +201,9 @@ public class ClientRESTTransacted extends TestCase { ...@@ -197,7 +201,9 @@ public class ClientRESTTransacted extends TestCase {
// create a transacted producer // create a transacted producer
response = client.target(response.getLink("create-producer").getUri()) response = client.target(response.getLink("create-producer").getUri())
.request().accept(MediaType.TEXT_PLAIN).post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED)); .request().accept(MediaType.TEXT_PLAIN).post(null);
// TODO (AF):
//.post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED));
assertEquals("create-producer", 201, response.getStatus()); assertEquals("create-producer", 201, response.getStatus());
URI uriCloseProd = response.getLink("close-context").getUri(); URI uriCloseProd = response.getLink("close-context").getUri();
...@@ -217,7 +223,9 @@ public class ClientRESTTransacted extends TestCase { ...@@ -217,7 +223,9 @@ public class ClientRESTTransacted extends TestCase {
assertEquals("send-next-message", 200, response.getStatus()); assertEquals("send-next-message", 200, response.getStatus());
// create a transacted consumer // create a transacted consumer
response = client.target(uriCreateConsTransacted).request().accept(MediaType.TEXT_PLAIN).post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED)); response = client.target(uriCreateConsTransacted).request().accept(MediaType.TEXT_PLAIN).post(null);
// TODO (AF):
//.post(Entity.entity(null, MediaType.APPLICATION_FORM_URLENCODED));
assertEquals("create-consumer-transacted", 201, response.getStatus()); assertEquals("create-consumer-transacted", 201, response.getStatus());
URI uriCloseCons = response.getLink("close-context").getUri(); URI uriCloseCons = response.getLink("close-context").getUri();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment