]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-4335: Added XMLReplay run file for CollectionObjects advanced search, omitted...
authorAron Roberts <aron@socrates.berkeley.edu>
Fri, 2 Sep 2011 20:55:04 +0000 (20:55 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Fri, 2 Sep 2011 20:55:04 +0000 (20:55 +0000)
services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/co1.xml [moved from services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/co1-adv-search-lifesci.xml with 100% similarity]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/co2.xml [moved from services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/co2-adv-search-lifesci.xml with 100% similarity]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/collectionobject-adv-search.xml [new file with mode: 0644]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/res/co2.res.xml [new file with mode: 0755]

diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/collectionobject-adv-search.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/collectionobject-adv-search.xml
new file mode 100644 (file)
index 0000000..22e8f0f
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- XMLReplay tests of advanced search in CollectionObject records -->
+<xmlReplay>
+    <auths>
+        <!-- IMPORTANT: THESE ARE STICKY :: THEY STICK AROUND UNTIL RESET, IN EXEC ORDER OF THIS FILE. -->
+        <auth ID="admin@lifesci.collectionspace.org">YWRtaW5AY29yZS5jb2xsZWN0aW9uc3BhY2Uub3JnOkFkbWluaXN0cmF0b3I=</auth>
+    </auths>
+    
+    <testGroup ID="advSearchCommonSchema" autoDeletePOSTS="true">
+        <!-- Create a new CollectionObject record with a common part. -->
+       <test ID="co1"  auth="admin@lifesci.collectionspace.org">
+             <method>POST</method>
+             <uri>/cspace-services/collectionobjects/</uri>
+             <filename>collectionobject/co1.xml</filename>
+         </test>
+        <!-- Advanced search for CollectionObject records matching the -->
+        <!-- expected text within a single field in the common part. -->
+        <test ID="co1advsearch">
+            <method>GET</method>
+            <uri>/cspace-services/collectionobjects?as=collectionobjects_common%3AobjectNumber%3D'6.0221415'</uri>
+            <response>
+                <expected level="TEXT" />
+                <label>abstract-common-list</label>
+                <filename>collectionobject/res/co1-adv-search-lifesci.res.xml</filename>
+             </response>
+         </test>
+    </testGroup>
+   
+    <testGroup ID="advSearchExtensionSchema" autoDeletePOSTS="true">
+        <!-- Create a new CollectionObject record with an extension schema part -->
+       <test ID="co2"  auth="admin@lifesci.collectionspace.org">
+             <method>POST</method>
+             <uri>/cspace-services/collectionobjects/</uri>
+             <filename>collectionobject/co2.xml</filename>
+        </test>
+        <!-- Verify that the record contains an expected field value -->
+        <!-- in the extension schema part -->
+        <test ID="co2get">
+            <method>GET</method>
+            <uri>/cspace-services/collectionobjects/${co2.CSID}</uri>
+            <response>
+                <expected level="TEXT" />
+                <label>collectionobjects_naturalhistory</label>
+                               <filename>collectionobject/res/co2.res.xml</filename>
+             </response>
+        </test>
+        <!-- Advanced search for CollectionObject records matching the -->
+        <!-- expected text within a single field in the extension schema part. -->
+        <!--
+        <test ID="co2advsearch">
+            <method>GET</method>
+            <uri>/cspace-services/collectionobjects?as=collectionobjects_naturalhistory%3AfieldLocVerbatim%3D'jlmbsoqjlmbsoq'</uri>
+            <response>
+                <expected level="TEXT" />
+                <label>abstract-common-list</label>
+                <filename>collectionobject/res/co2-adv-search-lifesci.res.xml</filename>
+             </response>
+         </test>
+         -->
+    </testGroup>
+
+</xmlReplay>
+        
+        
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/res/co2.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/res/co2.res.xml
new file mode 100755 (executable)
index 0000000..7a31240
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<document name="collectionobjects">
+  <ns2:collectionobjects_common
+    xmlns:ns2="http://collectionspace.org/services/collectionobject">
+    <objectNumber>6.0221415</objectNumber>
+  </ns2:collectionobjects_common>
+</document>