tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1237573 - /openejb/trunk/openejb/examples/rest-on-ejb/src/test/java/org/superbiz/rest/UserServiceTest.java
Date Mon, 30 Jan 2012 09:31:00 GMT
Author: rmannibucau
Date: Mon Jan 30 09:30:59 2012
New Revision: 1237573

URL: http://svn.apache.org/viewvc?rev=1237573&view=rev
Log:
fixing rest-on-ejb test

Modified:
    openejb/trunk/openejb/examples/rest-on-ejb/src/test/java/org/superbiz/rest/UserServiceTest.java

Modified: openejb/trunk/openejb/examples/rest-on-ejb/src/test/java/org/superbiz/rest/UserServiceTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/rest-on-ejb/src/test/java/org/superbiz/rest/UserServiceTest.java?rev=1237573&r1=1237572&r2=1237573&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/rest-on-ejb/src/test/java/org/superbiz/rest/UserServiceTest.java
(original)
+++ openejb/trunk/openejb/examples/rest-on-ejb/src/test/java/org/superbiz/rest/UserServiceTest.java
Mon Jan 30 09:30:59 2012
@@ -106,7 +106,7 @@ public class UserServiceTest {
                 .path("/user/list")
                 .get(String.class);
         assertEquals(
-                "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+                inline("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
                         "<users>" +
                         "  <user>" +
                         "    <email>foo@foo.com</email>" +
@@ -120,7 +120,12 @@ public class UserServiceTest {
                         "    <id>2</id>" +
                         "    <password>barpwd</password>" +
                         "  </user>" +
-                        "</users>", users);
+                        "</users>"), inline(users));
+    }
+
+    private static String inline(String s) {
+        return s.replace(System.getProperty("line.separator"), "").replace("\n", "")
+                .replace(" ", "").replace("\t", "");
     }
 
     @Test



Mime
View raw message