<expectedCodes>201</expectedCodes>\r
</test>\r
\r
- <!-- Reversal of the direction of the relationship -->\r
- <test ID="relateCollectionObjectToMovement3">\r
+ <test ID="relateMovement3ToCollectionObject">\r
<method>POST</method>\r
<uri>/cspace-services/relations</uri>\r
<filename>batch/relation.xml</filename>\r
<vars>\r
- <var ID="subjectCsid">${createMovement3.CSID}</var>\r
- <var ID="subjectDocumentType">Movement</var>\r
- <var ID="objectCsid">${createCollectionObject.CSID}</var>\r
- <var ID="objectDocumentType">CollectionObject</var>\r
+ <var ID="subjectCsid">${createCollectionObject.CSID}</var>\r
+ <var ID="subjectDocumentType">CollectionObject</var>\r
+ <var ID="objectCsid">${createMovement3.CSID}</var>\r
+ <var ID="objectDocumentType">Movement</var>\r
</vars>\r
<expectedCodes>201</expectedCodes>\r
</test>\r
\r
<!-- This post of a batch job invocation request doesn't create a new record, -->\r
<!-- so we need to exclude it from the post-run auto-deletion of records. -->\r
- <test ID="invokeBatch" auth="test" autoDeletePOSTS="false">\r
+ <test ID="invokeBatch1" auth="test" autoDeletePOSTS="false">\r
<method>POST</method>\r
<uri>/cspace-services/batch/${createBatchRecord.CSID}</uri>\r
<filename>batch/batch-invoke-updateobjloc-single.xml</filename>\r
<!-- computedCurrentLocation field in the CollectionObject record has -->\r
<!-- been updated to the appropriate value, reflecting the most recent -->\r
<!-- movement (e.g. the Movement record with the most recent locationDate). -->\r
- <test ID="readUpdatedCollectionObjectRecord">\r
+ <test ID="readUpdatedCollectionObjectRecord1">\r
<method>GET</method>\r
<uri>/cspace-services/collectionobjects/${createCollectionObject.CSID}</uri>\r
<filename>batch/updateobjloc.xml</filename>\r
</vars>\r
</response>\r
<expectedCodes>200</expectedCodes>\r
- </test> \r
+ </test>\r
+ \r
+ <!-- The currentLocation value of this new Movement record, which now -->\r
+ <!-- has the most recent locationDate value, should thus be -->\r
+ <!-- reflected in the computedCurrentLocation value in the -->\r
+ <!-- CollectionObject record after invoking the batch job a second time. -->\r
+ <test ID="createMovement4">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/movements</uri>\r
+ <filename>batch/movement.xml</filename>\r
+ <vars>\r
+ <var ID="currentLocation">location-4</var>\r
+ <var ID="locationDate">2100-01-01</var>\r
+ </vars>\r
+ <expectedCodes>201</expectedCodes>\r
+ </test>\r
+ \r
+ <!-- Represents a reversal of the (subject-object) direction of the relationship -->\r
+ <test ID="relateCollectionObjectToMovement4">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/relations</uri>\r
+ <filename>batch/relation.xml</filename>\r
+ <vars>\r
+ <var ID="subjectCsid">${createMovement4.CSID}</var>\r
+ <var ID="subjectDocumentType">Movement</var>\r
+ <var ID="objectCsid">${createCollectionObject.CSID}</var>\r
+ <var ID="objectDocumentType">CollectionObject</var>\r
+ </vars>\r
+ <expectedCodes>201</expectedCodes>\r
+ </test>\r
+ \r
+ <test ID="invokeBatchAfterAddingReverseRelation" auth="test" autoDeletePOSTS="false">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/batch/${createBatchRecord.CSID}</uri>\r
+ <filename>batch/batch-invoke-updateobjloc-single.xml</filename>\r
+ <vars>\r
+ <var ID="collectionObjectCSID">${createCollectionObject.CSID}</var>\r
+ </vars>\r
+ <expectedCodes>200</expectedCodes>\r
+ </test>\r
+ \r
+ <!--\r
+ <test ID="readUpdatedCollectionObjectRecordAfterAddingReverseRelation">\r
+ <method>GET</method>\r
+ <uri>/cspace-services/collectionobjects/${createCollectionObject.CSID}</uri>\r
+ <filename>batch/updateobjloc.xml</filename>\r
+ <response>\r
+ <expected level="TEXT" />\r
+ <filename>batch/res/collectionobject.res.xml</filename>\r
+ <vars>\r
+ <var ID="computedCurrentLocationValue">${createMovement4.currentLocation}</var>\r
+ </vars>\r
+ </response>\r
+ <expectedCodes>200</expectedCodes>\r
+ </test>\r
+ -->\r
\r
</testGroup>\r
\r