]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-1927 - Adding tests to check the displayName update.
authorPatrick Schmitz <pschmitz@berkeley.edu>
Wed, 9 Nov 2011 22:20:26 +0000 (22:20 +0000)
committerPatrick Schmitz <pschmitz@berkeley.edu>
Wed, 9 Nov 2011 22:20:26 +0000 (22:20 +0000)
services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/authrefs.xml [new file with mode: 0644]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/loanout.xml [new file with mode: 0644]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson1.xml [new file with mode: 0644]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson2.xml [new file with mode: 0644]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPersonAuthority.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/updatePerson1.xml [new file with mode: 0644]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/updatePerson2.xml [new file with mode: 0644]

diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/authrefs.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/authrefs.xml
new file mode 100644 (file)
index 0000000..c319a4c
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xmlReplay>\r
+    <!-- \r
+         testGroup ID="person" is not live.  It works, but may not clean up correctly. \r
+         For now, use ID="updatePerson"\r
+    -->\r
+    <testGroup ID="AuthRefs" autoDeletePOSTS="true">\r
+        <test ID="PersonAuth1" auth="admin@core.collectionspace.org">\r
+            <method>POST</method>\r
+            <uri>/cspace-services/personauthorities/</uri>\r
+            <filename>authrefs/newPersonAuthority.xml</filename>\r
+        </test>\r
+        <test ID="Person1">\r
+            <method>POST</method>\r
+            <uri>/cspace-services/personauthorities/${PersonAuth1.CSID}/items/</uri>\r
+            <filename>authrefs/newPerson1.xml</filename>\r
+        </test>\r
+        <test ID="Person2">\r
+            <method>POST</method>\r
+            <uri>/cspace-services/personauthorities/${PersonAuth1.CSID}/items/</uri>\r
+            <filename>authrefs/newPerson2.xml</filename>\r
+        </test>\r
+\r
+        <test ID="loanout1" auth="test">\r
+            <method>POST</method>\r
+            <uri>/cspace-services/loansout/</uri>\r
+            <filename>authrefs/loanout.xml</filename>\r
+            <vars>\r
+                <var ID="loannum">42</var>\r
+                <var ID="person">${Person1.CSID}</var>\r
+            </vars>\r
+        </test>\r
+\r
+        <test ID="loanout2" auth="test">\r
+            <method>POST</method>\r
+            <uri>/cspace-services/loansout/</uri>\r
+            <filename>authrefs/loanout.xml</filename>\r
+            <vars>\r
+                <var ID="loannum">69</var>\r
+                <var ID="person">${Person2.CSID}</var>\r
+            </vars>\r
+        </test>\r
+\r
+        <test ID="UpdatePerson1">\r
+            <method>PUT</method>\r
+            <uri>/cspace-services/personauthorities/${PersonAuth1.CSID}/items/${Person1.CSID}</uri>\r
+            <filename>authrefs/updatePerson1.xml</filename>\r
+        </test>\r
+\r
+        <test ID="UpdatePerson2">\r
+            <method>PUT</method>\r
+            <uri>/cspace-services/personauthorities/${PersonAuth1.CSID}/items/${Person2.CSID}</uri>\r
+            <filename>authrefs/updatePerson2.xml</filename>\r
+        </test>\r
+    </testGroup>\r
+\r
+</xmlReplay>\r
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/loanout.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/loanout.xml
new file mode 100644 (file)
index 0000000..2ab7824
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document name="loansout">
+  <ns2:loansout_common xmlns:ns2="http://collectionspace.org/services/loanout" xmlns:ns3="http://collectionspace.org/services/jaxb">
+    <loanOutNumber>loanoutNumber-${loannum}</loanOutNumber>
+    <borrowersContact>${person}</borrowersContact>
+    <loanedObjectStatusGroupList>
+      <loanedObjectStatusGroup>
+        <loanedObjectStatus>returned</loanedObjectStatus>
+        <loanedObjectStatusNote>Left under the front mat.</loanedObjectStatusNote>
+      </loanedObjectStatusGroup>
+    </loanedObjectStatusGroupList>
+    <loanPurpose>Allow people in cold climes to share the magic of Surfboards of the 1960s.</loanPurpose>
+  </ns2:loansout_common>
+</document>
+
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson1.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson1.xml
new file mode 100644 (file)
index 0000000..ee80f56
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<document name="persons">\r
+       <ns2:persons_common xmlns:ns2="http://collectionspace.org/services/person" xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+               <shortIdentifier>connieContactPerson</shortIdentifier>\r
+               <displayNameComputed>true</displayNameComputed>\r
+               <foreName>Connie</foreName>\r
+               <surName>ContactPerson</surName>\r
+       </ns2:persons_common>\r
+</document>\r
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson2.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/newPerson2.xml
new file mode 100644 (file)
index 0000000..7fc57fa
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<document name="persons">\r
+       <ns2:persons_common xmlns:ns2="http://collectionspace.org/services/person" xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+               <shortIdentifier>debbieDoNothingPerson</shortIdentifier>\r
+               <displayNameComputed>true</displayNameComputed>\r
+               <foreName>Debbie</foreName>\r
+               <surName>DoNothingPerson</surName>\r
+       </ns2:persons_common>\r
+</document>\r
index 7809ec4785774f79508cc8d37fecc7b55c467304..86f4d56be0a3855bf3a9a3e45cde48860138d961 100755 (executable)
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
-<ns2:personauthorities_common xmlns:ns2="http://collectionspace.org/services/person" xmlns:ns3="http://collectionspace.org/services/jaxb">\r
-<displayName>TestPersonAuth</displayName>\r
-<shortIdentifier>TestPersonAuth</shortIdentifier>\r
-<refName>urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth)'TestPersonAuth'</refName>\r
-<vocabType>PersonAuthority</vocabType>\r
-</ns2:personauthorities_common>
\ No newline at end of file
+<document name="personauthorities">\r
+       <ns2:personauthorities_common xmlns:ns2="http://collectionspace.org/services/person" xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+               <displayName>TestPersonAuth</displayName>\r
+               <shortIdentifier>TestPersonAuth</shortIdentifier>\r
+               <vocabType>PersonAuthority</vocabType>\r
+       </ns2:personauthorities_common>\r
+</document>\r
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/updatePerson1.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/updatePerson1.xml
new file mode 100644 (file)
index 0000000..7d3103a
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<document name="persons">\r
+       <ns2:persons_common xmlns:ns2="http://collectionspace.org/services/person" xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+               <shortIdentifier>connieContactPerson</shortIdentifier>\r
+               <displayNameComputed>true</displayNameComputed>\r
+               <foreName>Connie</foreName>\r
+               <surName>ContactPersonlity</surName>\r
+       </ns2:persons_common>\r
+</document>\r
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/updatePerson2.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authrefs/updatePerson2.xml
new file mode 100644 (file)
index 0000000..73cc943
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<document name="persons">\r
+       <ns2:persons_common xmlns:ns2="http://collectionspace.org/services/person" xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+               <shortIdentifier>debbieDoNothingPerson</shortIdentifier>\r
+               <displayNameComputed>true</displayNameComputed>\r
+               <foreName>Debbie</foreName>\r
+               <surName>Do Nothing Personality</surName>\r
+       </ns2:persons_common>\r
+</document>\r