1 <?xml version="1.0" encoding="UTF-8"?>
3 <testGroup ID="HierarchicCollectionObject" autoDeletePOSTS="true">
6 <!-- (parent of chess board, bags of white and black chess pieces -->
7 <test ID="CreateChessSetBox" auth="admin@core.collectionspace.org">
9 <uri>/cspace-services/collectionobjects</uri>
10 <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
12 <var ID="objectNumber">CSPACE-5518-ChessSetBox</var>
15 <test ID="ReadChessSetBox" auth="admin@core.collectionspace.org">
17 <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}</uri>
21 <!-- (child of chess set box, sibling of bags of white and black chess pieces) -->
22 <test ID="CreateChessBoard" auth="admin@core.collectionspace.org">
24 <uri>/cspace-services/collectionobjects</uri>
25 <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
27 <var ID="objectNumber">CSPACE-5518-ChessBoard</var>
30 <test ID="ReadChessBoard" auth="admin@core.collectionspace.org">
32 <uri>/cspace-services/collectionobjects/${CreateChessBoard.CSID}</uri>
35 <!-- Bags of white and black chess pieces -->
36 <!-- (child of chess set box, sibling of chess board, parents of chess pieces) -->
37 <test ID="CreateBagOfWhiteChessPieces">
39 <uri>/cspace-services/collectionobjects</uri>
40 <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
42 <var ID="objectNumber">CSPACE-5518-BagOfWhiteChessPieces</var>
45 <test ID="ReadBagOfWhiteChessPieces" auth="admin@core.collectionspace.org">
47 <uri>/cspace-services/collectionobjects/${CreateBagOfWhiteChessPieces.CSID}</uri>
49 <test ID="CreateBagOfBlackChessPieces">
51 <uri>/cspace-services/collectionobjects</uri>
52 <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
54 <var ID="objectNumber">CSPACE-5518-BagOfBlackChessPieces</var>
57 <test ID="ReadBagOfBlackChessPieces" auth="admin@core.collectionspace.org">
59 <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}</uri>
62 <!-- Individual chess pieces in those bags -->
63 <test ID="CreateWhiteRook">
65 <uri>/cspace-services/collectionobjects</uri>
66 <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
68 <var ID="objectNumber">CSPACE-5518-WhiteRook</var>
71 <test ID="ReadWhiteRook" auth="admin@core.collectionspace.org">
73 <uri>/cspace-services/collectionobjects/${CreateWhiteRook.CSID}</uri>
75 <test ID="CreateWhiteBishop">
77 <uri>/cspace-services/collectionobjects</uri>
78 <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
80 <var ID="objectNumber">CSPACE-5518-WhiteBishop</var>
83 <test ID="ReadWhiteBishop" auth="admin@core.collectionspace.org">
85 <uri>/cspace-services/collectionobjects/${CreateWhiteBishop.CSID}</uri>
87 <test ID="CreateBlackQueen">
89 <uri>/cspace-services/collectionobjects</uri>
90 <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
92 <var ID="objectNumber">CSPACE-5518-BlackQueen</var>
95 <test ID="ReadBlackQueen" auth="admin@core.collectionspace.org">
97 <uri>/cspace-services/collectionobjects/${CreateBlackQueen.CSID}</uri>
99 <test ID="CreateBlackRook">
100 <method>POST</method>
101 <uri>/cspace-services/collectionobjects</uri>
102 <filename>collectionobject/hierarchy/1-collectionobject.xml</filename>
104 <var ID="objectNumber">CSPACE-5518-BlackRook</var>
107 <test ID="ReadBlackRook" auth="admin@core.collectionspace.org">
109 <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}</uri>
113 <test ID="DeleteBlackRook" auth="admin@core.collectionspace.org">
114 <method>DELETE</method>
115 <uri>/cspace-services/collectionobjects/${CreateBlackRook.CSID}</uri>
117 <test ID="DeleteBlackQueen" auth="admin@core.collectionspace.org">
118 <method>DELETE</method>
119 <uri>/cspace-services/collectionobjects/${CreateBlackQueen.CSID}</uri>
121 <test ID="DeleteWhiteBishop" auth="admin@core.collectionspace.org">
122 <method>DELETE</method>
123 <uri>/cspace-services/collectionobjects/${CreateWhiteBishop.CSID}</uri>
125 <test ID="DeleteWhiteRook" auth="admin@core.collectionspace.org">
126 <method>DELETE</method>
127 <uri>/cspace-services/collectionobjects/${CreateWhiteRook.CSID}</uri>
129 <test ID="DeleteBagOfBlackChessPieces" auth="admin@core.collectionspace.org">
130 <method>DELETE</method>
131 <uri>/cspace-services/collectionobjects/${CreateBagOfBlackChessPieces.CSID}</uri>
133 <test ID="DeleteBagOfWhiteChessPieces" auth="admin@core.collectionspace.org">
134 <method>DELETE</method>
135 <uri>/cspace-services/collectionobjects/${CreateBagOfWhiteChessPieces.CSID}</uri>
137 <test ID="DeleteChessBoard" auth="admin@core.collectionspace.org">
138 <method>DELETE</method>
139 <uri>/cspace-services/collectionobjects/${CreateChessBoard.CSID}</uri>
141 <test ID="DeleteChessSetBox" auth="admin@core.collectionspace.org">
142 <method>DELETE</method>
143 <uri>/cspace-services/collectionobjects/${CreateChessSetBox.CSID}</uri>
149 <test ID="LocationChild3">
150 <method>POST</method>
151 <uri>/cspace-services/collectionobjects/${LocationAuth1.CSID}/items/</uri>
152 <filename>collectionobject/hierarchy/2-item.xml</filename>
154 <var ID="inAuthority">${LocationAuth1.CSID}</var>
155 <var ID="authShortIdentifier">CSPACE3739LocationAuthority</var>
156 <var ID="shortIdentifier">Shelf3</var>
157 <var ID="name">Shelf 3</var>
161 <test ID="LocationParent">
162 <method>POST</method>
163 <uri>/cspace-services/collectionobjects/urn:cspace:name(CSPACE3739LocationAuthority)/items/</uri>
164 <filename>collectionobject/hierarchy/2-item.xml</filename>
166 <var ID="inAuthority">${LocationAuth1.CSID}</var>
167 <var ID="authShortIdentifier">CSPACE3739LocationAuthority</var>
168 <var ID="shortIdentifier">Aisle3</var>
169 <var ID="name">Aisle 3</var>
173 <test ID="Location1_old">
174 <method>POST</method>
175 <uri>/cspace-services/collectionobjects/urn:cspace:name(CSPACE3739LocationAuthority)/items/</uri>
176 <filename>collectionobject/hierarchy/3-locations_w_relations_CSID.xml</filename>
178 <var ID="name">Cabinet 1</var>
179 <var ID="parentCSID">${LocationParent.CSID}</var>
180 <var ID="childCSID">${LocationChild1.CSID}</var>
181 <var ID="child2CSID">${LocationChild2.CSID}</var>
182 <var ID="child3CSID">${LocationChild3.CSID}</var>
186 <test ID="Location1">
187 <method>POST</method>
188 <uri>/cspace-services/collectionobjects/urn:cspace:name(CSPACE3739LocationAuthority)/items/</uri>
189 <filename>collectionobject/hierarchy/5-locations_w_relations_RefNames.xml</filename>
191 <var ID="shortIdentifier">Cabinet1a</var>
192 <var ID="name">Cabinet 1a</var>
193 <var ID="childCSID">${LocationChild1.CSID}</var>
194 <var ID="child2CSID">${LocationChild2.CSID}</var>
195 <var ID="child3CSID">${LocationChild3.CSID}</var>
199 <test ID="GetLocation">
201 <uri>/cspace-services/collectionobjects/${LocationAuth1.CSID}/items/${Location1.CSID}?showRelations=true</uri>
206 <!-- NOTE: item on url is .../items/${LocationChild1.CSID} so this looks for
207 siblings of Child1, which would be child2 and child3.
211 <test ID="Get_siblings">
213 <uri>/cspace-services/collectionobjects/${LocationAuth1.CSID}/items/${LocationChild1.CSID}?showSiblings=true</uri>
215 <expected level="ADDOK" />
216 <filename>collectionobject/hierarchy/res/Get_siblings.res.xml</filename>
218 <var ID="locationCSID">${Location1.CSID}</var>
219 <var ID="child1CSID">${LocationChild1.CSID}</var>
220 <var ID="child2CSID">${LocationChild2.CSID}</var>
222 <startElement>/document/*[local-name()='relations-common-list']</startElement>
227 <test ID="Get_allRelations">
229 <uri>/cspace-services/collectionobjects/${LocationAuth1.CSID}/items/${Location1.CSID}?showAllRelations=true</uri>
231 <expected level="ADDOK" />
232 <filename>collectionobject/hierarchy/res/Get_allRelations.res.xml</filename>
234 <!-- NOTE: vars are referenced in showAllRelations.res.xml
235 from tests in this test group, e.g.
236 LocationParent.CSID :: ${LocationParent.CSID}
237 These vars are all in the expression context while this group is active,
238 because we hang onto all ServiceResult objects for the duration of the group,
239 and ServiceObjects keep their vars.
243 <startElement>/document/*[local-name()='relations-common-list']</startElement>
249 <test ID="relationsGET">
251 <uri>/cspace-services/relations/</uri>
254 <test ID="relations_sbj">
256 <uri>/cspace-services/relations?sbj=${Location1.CSID}</uri>
259 <test ID="relations_obj">
261 <uri>/cspace-services/relations?obj=${Location1.CSID}</uri>