Author: hlship
Date: Thu Jan  7 00:15:55 2010
New Revision: 896724

URL: http://svn.apache.org/viewvc?rev=896724&view=rev
Log:
Correct TAP5-765 test to not be platform sensitive (ordering of keys in a map 
broke the test on the CI server)

Modified:
    
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PartialDocumentLinkerImplTest.java

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PartialDocumentLinkerImplTest.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PartialDocumentLinkerImplTest.java?rev=896724&r1=896723&r2=896724&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PartialDocumentLinkerImplTest.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PartialDocumentLinkerImplTest.java
 Thu Jan  7 00:15:55 2010
@@ -14,6 +14,7 @@
 
 package org.apache.tapestry5.internal.services;
 
+import org.apache.tapestry5.json.JSONArray;
 import org.apache.tapestry5.json.JSONObject;
 import org.testng.Assert;
 import org.testng.annotations.Test;
@@ -50,8 +51,12 @@
 
         linker.commit(reply);
 
-        assertEquals(reply.toString(),
-                
"{\"stylesheets\":[{\"href\":\"foo.css\"},{\"media\":\"print\",\"href\":\"bar.css\"}]}");
+        // JDK version affect this (order of attributes), so it's the hard way.
 
+        JSONObject expected = new JSONObject().put("stylesheets", new 
JSONArray(new JSONObject()
+                .put("href", "foo.css"), new JSONObject().put("media", 
"print").put("href",
+                "bar.css")));
+
+        assertEquals(reply, expected);
     }
 }


Reply via email to