--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<imports>
+ <import service="Locations" type="Locationitem" CSID="${recordCSID}">
+ <schema xmlns:locations_common="http://collectionspace.org/services/location"
+ name="locations_common">
+ <!--
+ Values containing Ampersand character entities are hard-coded
+ here in this file, rather than being passed in as values from
+ the XmlReplay control file, because in the control file it
+ appears we needed to double-encode them as '&amp;',
+ which would complicate testing of CSPACE-5940.
+ -->
+ <locTermGroupList>
+ <locTermGroup>
+ <termDisplayName>Wattford & Gump Outbuilding</termDisplayName>
+ </locTermGroup>
+ </locTermGroupList>
+ <shortIdentifier>${shortIdentifierValue}</shortIdentifier>
+ <refName>urn:cspace:core.collectionspace.org:locationauthorities:name(${importLocationAuthorityWithVarExpansion.shortIdentifierValue})'Wattford & Gump Outbuilding'</refName>
+ <inAuthority>${inAuthorityValue}</inAuthority>
+ </schema>
+ </import>
+</imports>
<!-- Verify that a refName value provided in the body of an authority record -->
- <!-- and is present, as well, in the collectionspace_core part's refName field. -->
+ <!-- is copied to and is present, as well, in the collectionspace_core part's -->
+ <!-- refName field. -->
<test ID="importLocationAuthorityWithVarExpansion">
<expectedCodes>200</expectedCodes>
<method>POST</method>
<method>DELETE</method>
<uri>/cspace-services/locationauthorities/${importLocationAuthorityWithVarExpansion.recordCSID}</uri>
</test>
+
+ <!--
+ Verify that a refName value provided in the body of an authority
+ term (item) record is copied to and is present, as well, in the
+ collectionspace_core part's refName field.
+
+ This also tests proper handling of entity-encoded ampersands
+ contained within display name values in refNames. 9See CSPACE-5940.)
+ -->
+<test ID="importLocationItemWithVarExpansion">
+ <expectedCodes>200</expectedCodes>
+ <method>POST</method>
+ <uri>/cspace-services/imports</uri>
+ <filename>imports/import-locationitem-varexpansion.xml</filename>
+ <vars>
+ <var ID="recordCSID">5c45cdf7-f1bd-4ff3-844d-59f40ffc5b29</var>
+ <var ID="shortIdentifierValue">wattfordandgumpoutbuilding</var>
+ <var ID="inAuthorityValue">${importLocationAuthorityWithVarExpansion.recordCSID}</var>
+ </vars>
+ <response>
+ <expected level="TEXT" />
+ <filename>imports/res/import-locationitem.res.xml</filename>
+ </response>
+ </test>
+ <test ID="verifyLocationItemWithVarExpansion">
+ <expectedCodes>200</expectedCodes>
+ <method>GET</method>
+ <uri>/cspace-services/locationauthorities/${importLocationAuthorityWithVarExpansion.recordCSID}/items/${importLocationItemWithVarExpansion.recordCSID}</uri>
+ <response>
+ <filename>imports/res/import-locationitem-varexpansion.res.xml</filename>
+ <expected level="ADDOK" />
+ <parts>
+ <part>
+ <label>collectionspace_core</label>
+ </part>
+ <part>
+ <label>locations_common</label>
+ </part>
+ </parts>
+ <vars>
+ <var ID="shortIdentifierValue">${importLocationItemWithVarExpansion.shortIdentifierValue}</var>
+ <var ID="inAuthorityValue">${importLocationItemWithVarExpansion.inAuthorityValue}</var>
+ <var ID="uriValue">/locationauthorities/${importLocationAuthorityWithVarExpansion.recordCSID}/items/${importLocationItemWithVarExpansion.recordCSID}</var>
+ </vars>
+ </response>
+ </test>
+ <test ID="deleteLocationItemWithVarExpansion">
+ <expectedCodes>200</expectedCodes>
+ <method>DELETE</method>
+ <uri>/cspace-services/locationauthorities/${importLocationAuthorityWithVarExpansion.recordCSID}/items/${importLocationItemWithVarExpansion.recordCSID}</uri>
+ </test>
<!-- Verify that a refName value is correctly generated for an authority -->
<!-- record, when that value is not provided in the imported record, and -->
<method>DELETE</method>
<uri>/cspace-services/locationauthorities/${importLocationAuthorityWithGeneratedRefName.recordCSID}</uri>
</test>
+
<!--
Import a record containing dollar sign and backslash character(s).
<testGroup ID="importsTemporaryTestGroup" autoDeletePOSTS="false">
<!-- Add new or changed tests here -->
-
+
</testGroup>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<document name="locations">
+ <ns2:locations_common
+ xmlns:ns2="http://collectionspace.org/services/location">
+ <!--
+ Values containing Ampersand character entities are hard-coded
+ here in this file, rather than being passed in as values from
+ the XmlReplay control file, because in the control file it
+ appears we needed to double-encode them as '&amp;',
+ which would complicate testing of CSPACE-5940.
+ -->
+ <locTermGroupList>
+ <locTermGroup>
+ <termDisplayName>Wattford & Gump Outbuilding</termDisplayName>
+ </locTermGroup>
+ </locTermGroupList>
+ <shortIdentifier>${shortIdentifierValue}</shortIdentifier>
+ <inAuthority>${inAuthorityValue}</inAuthority>
+ </ns2:locations_common>
+ <ns2:collectionspace_core xmlns:ns2="http://collectionspace.org/collectionspace_core/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <!-- Note: This test may fail if the identifier for the core tenant changes. -->
+ <tenantId>1</tenantId>
+ <uri>${uriValue}</uri>
+ <refName>urn:cspace:core.collectionspace.org:locationauthorities:name(${importLocationAuthorityWithVarExpansion.shortIdentifierValue})'Wattford & Gump Outbuilding'</refName>
+ </ns2:collectionspace_core>
+</document>
+