You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jg...@apache.org on 2017/10/24 15:37:41 UTC
tomee git commit: Fix tests
Repository: tomee
Updated Branches:
refs/heads/master 1f90ee23c -> 6a97e5a41
Fix tests
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/6a97e5a4
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/6a97e5a4
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/6a97e5a4
Branch: refs/heads/master
Commit: 6a97e5a41d31b78db3e59f879e30ffafb6da2c92
Parents: 1f90ee2
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Tue Oct 24 16:37:16 2017 +0100
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Tue Oct 24 16:37:16 2017 +0100
----------------------------------------------------------------------
.../src/test/java/org/superbiz/rest/GreetingServiceTest.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/6a97e5a4/examples/rest-xml-json/src/test/java/org/superbiz/rest/GreetingServiceTest.java
----------------------------------------------------------------------
diff --git a/examples/rest-xml-json/src/test/java/org/superbiz/rest/GreetingServiceTest.java b/examples/rest-xml-json/src/test/java/org/superbiz/rest/GreetingServiceTest.java
index 7b54d10..c7caa5a 100644
--- a/examples/rest-xml-json/src/test/java/org/superbiz/rest/GreetingServiceTest.java
+++ b/examples/rest-xml-json/src/test/java/org/superbiz/rest/GreetingServiceTest.java
@@ -52,6 +52,7 @@ public class GreetingServiceTest {
public void postXml() throws IOException {
final String message = WebClient.create("http://localhost:4204")
.path("/test/greeting/")
+ .type(MediaType.APPLICATION_XML_TYPE)
.accept(MediaType.APPLICATION_XML_TYPE)
.post("<request><value>Hi REST!</value></request>", String.class);
assertEquals("<response><value>hi rest!</value></response>", message.replaceAll("<\\?[^>]*\\?>", "").trim());
@@ -70,6 +71,7 @@ public class GreetingServiceTest {
public void postJson() throws IOException {
final String message = WebClient.create("http://localhost:4204")
.path("/test/greeting/")
+ .type(MediaType.APPLICATION_JSON_TYPE)
.accept(MediaType.APPLICATION_JSON_TYPE)
.post(new Request("Hi REST!"), String.class);
assertEquals("{\"value\":\"hi rest!\"}", message);