esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esjew...@apache.org
Subject svn commit: r966214 - in /incubator/esme/branches: metadata/ metadata/src/main/scala/org/apache/esme/lib/ metadata/src/main/scala/org/apache/esme/model/ metadata/src/test/scala/org/apache/esme/api/ tagandconversationfollow/ tagandconversationfollow/src...
Date Wed, 21 Jul 2010 13:09:54 GMT
Author: esjewett
Date: Wed Jul 21 13:09:54 2010
New Revision: 966214

URL: http://svn.apache.org/viewvc?rev=966214&view=rev
Log:
Create metadata branch with failing tests [ESME-242] and a branch to work on the tag-and-conversation-follow
functionality in [ESME-256].

Added:
    incubator/esme/branches/metadata/
      - copied from r965211, incubator/esme/trunk/server/
    incubator/esme/branches/metadata/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala
      - copied unchanged from r965224, incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala
    incubator/esme/branches/metadata/src/main/scala/org/apache/esme/model/AccessPool.scala
      - copied unchanged from r965224, incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala
    incubator/esme/branches/tagandconversationfollow/
      - copied from r965211, incubator/esme/trunk/server/
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala
      - copied unchanged from r965224, incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/AccessPool.scala
      - copied unchanged from r965224, incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala
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=966214&r1=965211&r2=966214&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 Wed
Jul 21 13:09:54 2010
@@ -370,6 +370,33 @@ object Api2Specs extends Specification w
         for (session_res <- post("user/messages", "message" -> "test message")) {
           session_res.code must be equalTo 403
         }
+      }      
+      
+      "with XML metadata" in {
+        for{
+          session <- post_session       
+          mess_res <- session.post("user/messages",
+            "message" -> "test POST message",
+            "metadata" -> "<outer><meta><metameta>Hello</metameta></meta><onlymeta>Meta</onlymeta></outer>")
             
+        } {
+          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>)
        
+        }
+      }  
+      
+      "with JSON metadata" in {
+        for{
+          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>""")
             
+        } {
+          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}}]"""         
+        }
       }
     }
 



Mime
View raw message