]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5024: First keyword search tests added and passing.
authorAron Roberts <aron@socrates.berkeley.edu>
Fri, 20 Apr 2012 03:13:52 +0000 (20:13 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Fri, 20 Apr 2012 03:13:52 +0000 (20:13 -0700)
services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/authority.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/personitem.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/res/keywordSearchAuthorityItems1.res.xml [new file with mode: 0644]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/res/keywordSearchAuthorityItems2.res.xml [new file with mode: 0644]

index 3481ec82b9654b68a3177df44448c201c019f245..9a0c5d2044b68de5c5ddf2fefab302c11a248d10 100644 (file)
@@ -79,7 +79,7 @@
             <uri>/cspace-services/personauthorities/${createPersonAuthority2.CSID}/items</uri>
             <filename>authority/personitem.xml</filename>
             <vars>
-                <var ID="itemDisplayName">${createPersonAuthority1.identifier1}</var>
+                <var ID="itemDisplayName">${createPersonAuthority1.identifier1} ${createPersonAuthority1.identifier2}</var>
                 <var ID="itemShortIdentifier">${createPersonAuthority1.identifier1}3</var>
             </vars>
         </test>
         -->
         
         <!-- Keyword search -->
-        <!--
-        <test ID="keywordSearchAuthorityItems">
+        <test ID="keywordSearchAuthorityItems1">
             <expectedCodes>200</expectedCodes>
             <method>GET</method>
-            <uri>/cspace-services/authorities/_ALL_/items?kw=${createPersonAuthority1.name1}</uri>
+            <uri>/cspace-services/personauthorities/_ALL_/items?kw=${createPersonAuthority1.identifier1}</uri>
+            <vars>
+                <var ID="shortIdentifierBase">${createPersonAuthority1.identifier1}</var>
+            </vars>
             <response>
-                <expected level="ADDOK"/>
-                <filename>authority/res/keywordSearchAuthorityItems.res.xml</filename>
+                <expected level="TEXT"/>
+                <filename>authority/res/keywordSearchAuthorityItems1.res.xml</filename>
+            </response>
+        </test>
+         <test ID="keywordSearchAuthorityItems2">
+            <expectedCodes>200</expectedCodes>
+            <method>GET</method>
+            <uri>/cspace-services/personauthorities/_ALL_/items?kw=${createPersonAuthority1.identifier2}</uri>
+            <vars>
+                <var ID="shortIdentifierBase">${createPersonAuthority1.identifier1}</var>
+            </vars>
+            <response>
+                <expected level="TEXT"/>
+                <filename>authority/res/keywordSearchAuthorityItems2.res.xml</filename>
             </response>
         </test>
-        -->
         
         <!-- Partial term search -->
         <!--
index ecf1a22727e7081d6c4179810191a7936706d81f..633411f7dfc13a7a764cddd48d2db8aba5118d13 100644 (file)
@@ -4,5 +4,6 @@
         <displayName>${itemDisplayName}</displayName>\r
         <shortIdentifier>${itemShortIdentifier}</shortIdentifier>\r
         <bioNote>A bio note for this Person.</bioNote>\r
+        <foreName>${itemDisplayName}</foreName>\r
     </ns2:persons_common>\r
 </document>\r
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/res/keywordSearchAuthorityItems1.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/res/keywordSearchAuthorityItems1.res.xml
new file mode 100644 (file)
index 0000000..f3555df
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:abstract-common-list xmlns:ns2="http://collectionspace.org/services/jaxb">\r
+<totalItems>3</totalItems>\r
+<list-item>\r
+    <shortIdentifier>${createPersonAuthority1.identifier1}1</shortIdentifier>\r
+</list-item>\r
+<list-item>\r
+    <shortIdentifier>${createPersonAuthority1.identifier1}2</shortIdentifier>\r
+</list-item>\r
+<list-item>\r
+    <shortIdentifier>${createPersonAuthority1.identifier1}3</shortIdentifier>\r
+</list-item>\r
+</ns2:abstract-common-list>\r
+\r
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/res/keywordSearchAuthorityItems2.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/res/keywordSearchAuthorityItems2.res.xml
new file mode 100644 (file)
index 0000000..b875b94
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:abstract-common-list xmlns:ns2="http://collectionspace.org/services/jaxb">\r
+<totalItems>2</totalItems>\r
+<list-item>\r
+    <shortIdentifier>${createPersonAuthority1.identifier1}1</shortIdentifier>\r
+</list-item>\r
+<list-item>\r
+    <shortIdentifier>${createPersonAuthority1.identifier1}3</shortIdentifier>\r
+</list-item>\r
+</ns2:abstract-common-list>\r
+\r