incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esjew...@apache.org
Subject svn commit: r967096 - /incubator/esme/branches/metadata/src/test/scala/org/apache/esme/api/API2Test.scala
Date Fri, 23 Jul 2010 13:49:35 GMT
Author: esjewett
Date: Fri Jul 23 13:49:34 2010
New Revision: 967096

URL: http://svn.apache.org/viewvc?rev=967096&view=rev
Log:
[ESME-242] Correct API unit tests for metadata issue

Modified:
    incubator/esme/branches/metadata/src/test/scala/org/apache/esme/api/API2Test.scala

Modified: incubator/esme/branches/metadata/src/test/scala/org/apache/esme/api/API2Test.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/metadata/src/test/scala/org/apache/esme/api/API2Test.scala?rev=967096&r1=967095&r2=967096&view=diff
==============================================================================
--- incubator/esme/branches/metadata/src/test/scala/org/apache/esme/api/API2Test.scala (original)
+++ incubator/esme/branches/metadata/src/test/scala/org/apache/esme/api/API2Test.scala Fri
Jul 23 13:49:34 2010
@@ -379,9 +379,9 @@ object Api2Specs extends Specification w
             "message" -> "test POST message",
             "metadata" -> "<outer><meta><metameta>Hello</metameta></meta><onlymeta>Meta</onlymeta></outer>")
             
         } {
-          mess_res.code must be equalTo 200       
+          mess_res.code must be equalTo 200            
           (mess_res.xml.open_! \ "message") must \\ (<body>test POST message</body>)
   
-          (mess_res.xml.open_! \ "metadata") must \\ (<outer><meta><metameta>Hello</metameta></meta><onlymeta>Meta</onlymeta></outer>)
        
+          (mess_res.xml.open_! \\ "metadata") must be equalTo <metadata><outer><meta><metameta>Hello</metameta></meta><onlymeta>Meta</onlymeta></outer></metadata>
        
         }
       }  
       
@@ -390,12 +390,11 @@ object Api2Specs extends Specification w
           session <- post_session       
           mess_res <- session.post("user/messages",
             "message" -> "test POST message",
-            "metadata" -> """<anytag>"meta":[{"place":{"place_type":"city","region":"CA+"}},{"song":{"artist":"Prince","songtitle":"Never+Let+Me+Down"}}]</anytag>""")
             
+            "metadata" -> """"meta":[{"place":{"place_type":"city","region":"CA+"}},{"song":{"artist":"Prince","songtitle":"Never+Let+Me+Down"}}]""")
             
         } {
-          mess_res.code must be equalTo 200          
+          mess_res.code must be equalTo 200                  
           (mess_res.xml.open_! \ "message") must \\ (<body>test POST message</body>)
   
-          (mess_res.xml.open_! \ "metadata").text must be equalTo """[{place:{place_type:city,region:CA
}},{song:{artist:Prince,song 
-          title:Never Let Me Down}}]"""         
+          (mess_res.xml.open_! \\ "metadata") must be equalTo <metadata>{""""meta":[{"place":{"place_type":"city","region":"CA+"}},{"song":{"artist":"Prince","songtitle":"Never+Let+Me+Down"}}]"""}</metadata>
        
         }
       }
     }



Mime
View raw message